SVN+SSH and Sourceforge

前端 未结 4 561
不思量自难忘°
不思量自难忘° 2021-01-30 23:59

I\'m new to both Sourceforge and SVN (SilkSVN on Windows).

I managed to check out a project using

svn co --username=zeroth123 svn://zeroth123@svn.code.sf         


        
相关标签:
4条回答
  • 2021-01-31 00:31

    `%SVN_SSH% needs to be set correctly and an SSH key needs to be registered with Sourceforge.

    Note that new Sourceforge projects are version 2.0 by default, while 99% of the Sourceforge documentation is for version 1.0 and appears outdated.

    These instructions assume you have SVN and the PuTTY tools installed, and that you can successfully access your project using a non-secure protocol, eg the read-only svn checkout svn://USER@svn.code.sf.net/p/PROJECT/code/trunk PROJECT-code style command should work.

    These instructions explain how to do the same with svn checkout svn+ssh://... which is needed for write access to Sourceforge.

    1. Set %SVN_SSH% to the fully qualified path of your SSH client. E.g. setx SVN_SSH "C:/Program Files (x86)/PuTTY/plink.exe"

      • svn expects forward slashes or double back-slashes in the path
      • You may have to reopen a cmd window
      • Test by typing %SVN_SSH% at the prompt and confirm you get your ssh programs help screen (or whatever behaviour you expect from executing with no arguments)
    2. (Optional?) Cache the server RSA key. Open PuTTY, login to svn.code.sf.net (or whatever the server of your project is). A prompt will appear asking if you if you want to cache the server RSA key - click Yes.

      • You might not need to do this, if not when you use SVN to connect ot your project for the first time you will be asked the same question. Type y.
      • However, I did this because I thought the interactive prompt could be part of the problem.
    3. Create a public / private key and register the public key with Sourceforge.

      • On creating a key, more info herefor example.
      • If you use PuTTY, use PuTTYgen to create the key, and make sure the private key is loaded in pageant. Ironically Launchpad has excellent instructions.
      • The public key can be registered on Sourceforge by navigating to Home > Account > Services and clicking Edit SSH Keys for Shell/CVS.
    4. Now a checkout using svn+ssh protocol should work!

    0 讨论(0)
  • 2021-01-31 00:38

    For me the issue was that Tortoise was initially installed on the D drive. I uninstalled it and reinstalled it on C without changing the related settings. The solution was to copy the TortoiseSVN folder from C drive to its original location in D drive.

    0 讨论(0)
  • 2021-01-31 00:48

    For anybody (like me) working with Tortoise SVN who has it working for Tortoise SVN but needs command line access for easier bulk analysis... and doesn't want to go through the faff of registering an SSH key.

    1. Copy the value you are using in Tortoise - Settings - Network - SSH Client (mine has username, password arguments)
    2. Edit the command line configs ssh line in %APPDATA%\Subversion\config as per the answer above to use the line you copied from Tortoise

    That way, you can use the Tortoise Plink.exe with arguments for username and password.

    0 讨论(0)
  • 2021-01-31 00:50

    I followed the instructions here and it worked. Its a quicker method that doesn't require uploading keys etc.

    1. Download plink.exe from http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe
    2. Place the plink.exe in your windows installation directory (%windir%)
    3. Open the following file using Notepad %APPDATA%\Subversion\config
    4. Add or Replace the following line in the [tunnels] section (replace login and pwd with your sourceforge login and password)

      ssh = c:\\windows\\plink.exe -batch -l <LOGIN> -pw <PWD>
      

      (note the double backslash)

    5. Save and close the file
    0 讨论(0)
提交回复
热议问题