SVN+SSH and Sourceforge
Solution 1
`%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://[email protected]/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.
-
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)
-
-
(Optional?) Cache the server RSA key. Open
PuTTY
, login tosvn.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.
- 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
-
Create a public / private key and register the public key with Sourceforge.
- On creating a key, more info herefor example.
- If you use
PuTTY
, usePuTTYgen
to create the key, and make sure the private key is loaded inpageant
. Ironically Launchpad has excellent instructions. - The public key can be registered on Sourceforge by navigating to
Home > Account > Services
and clickingEdit SSH Keys for Shell/CVS
.
Now a checkout using
svn+ssh
protocol should work!
Solution 2
I followed the instructions here and it worked. Its a quicker method that doesn't require uploading keys etc.
- Download
plink.exe
from http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe - Place the
plink.exe
in your windows installation directory (%windir%
) - Open the following file using Notepad
%APPDATA%\Subversion\config
-
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)
- Save and close the file
Zero
Updated on June 24, 2022Comments
-
Zero almost 2 years
I'm new to both Sourceforge and SVN (SilkSVN on Windows).
I managed to check out a project using
svn co --username=zeroth123 svn://[email protected]/p/stddecimal/code/trunk stddecimal-code
However, every time I try and use ssh (so I can check in for example) it fails with
> svn co --username=zeroth123 svn+ssh://[email protected]/p/stddecimal/code/trunk stddecimal-code svn: E720087: Unable to connect to a repository at URL 'svn+ssh://[email protected]/p/stddecimal/code/trunk' svn: E720087: Can't create tunnel: The parameter is incorrect.
I've set
SVN_SSH
to point to my fully qualifiedplink.exe
and it makes no difference. I also tried changing it tojunk.exe
and didn't get anything different, so I don't think we're even looking atSVN_SSH
, which exhausts all of the advice I've been able to find on the Sourceforge and other forums.For the record I am the project administrator and therefore have write permissions (or at least think I do!)
Any ideas?
-
Felix Alcala almost 12 yearsPlease note that the name of the variable is %SVN_SSH% (and not %SSH_SVN%, as indicated in 1.)
-
lmat - Reinstate Monica over 11 yearsA couple things: one, I tried lots of things before coming to this site, so it looks like it's important that
appdata/subversion/config
doesn't have anything under the ssh tunnel. Also, I don't know whatpaegent
is, butpageant
worked for me! (after many many minutes of bashing my head against the wall trying to figure out why this doesn't work.) -
0xC0000022L over 10 yearsOr use forward slashes.