SVN + SSH和Sourceforge [英] SVN+SSH and Sourceforge
问题描述
我对Sourceforge和SVN(Windows上的SilkSVN)都是新手.
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.net/p/stddecimal/code/trunk stddecimal-code
但是,每次我尝试使用ssh(例如可以登录)时,都会失败
However, every time I try and use ssh (so I can check in for example) it fails with
> svn co --username=zeroth123 svn+ssh://zeroth123@svn.code.sf.net/p/stddecimal/code/trunk stddecimal-code
svn: E720087: Unable to connect to a repository at URL 'svn+ssh://zeroth123@svn.code.sf.net/p/stddecimal/code/trunk'
svn: E720087: Can't create tunnel: The parameter is incorrect.
我已将SVN_SSH
设置为指向我的完全合格的plink.exe
,这没有什么区别.我也尝试将其更改为junk.exe
并没有什么不同,所以我认为我们甚至没有在查看SVN_SSH
,它耗尽了我在Sourceforge和其他论坛.
I've set SVN_SSH
to point to my fully qualified plink.exe
and it makes no difference. I also tried changing it to junk.exe
and didn't get anything different, so I don't think we're even looking at SVN_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!)
有什么想法吗?
推荐答案
需要正确设置 %SVN_SSH%,并且需要在Sourceforge中注册SSH密钥.
`%SVN_SSH% needs to be set correctly and an SSH key needs to be registered with Sourceforge.
请注意,默认情况下,新的Sourceforge项目是 2.0版,而Sourceforge文档的99%是针对1.0版的,并且似乎已过时.
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.
这些说明假定您已安装SVN
和PuTTY
工具,并且可以使用非安全协议成功访问项目,例如,只读的svn checkout svn://USER@svn.code.sf.net/p/PROJECT/code/trunk PROJECT-code
样式命令应该可以使用.
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.
这些说明介绍了如何使用svn checkout svn+ssh://...
进行相同操作,这是对Sourceforge进行写访问所必需的.
These instructions explain how to do the same with svn checkout svn+ssh://...
which is needed for write access to Sourceforge.
-
将
%SVN_SSH%
设置为SSH客户端的标准路径.例如.setx SVN_SSH "C:/Program Files (x86)/PuTTY/plink.exe"
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
预期路径中的正斜杠或双反斜杠 - 您可能需要重新打开
cmd
窗口 - 通过在提示符下键入
%SVN_SSH%
进行测试,并确认您获得了ssh程序帮助屏幕(或在不执行任何参数的情况下期望执行的任何行为)
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)
(可选?)缓存服务器RSA密钥.打开PuTTY
,登录到svn.code.sf.net
(或项目的任何服务器).出现提示,询问您是否要缓存服务器RSA密钥-单击是".
(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.
- 您可能不需要这样做,如果是第一次使用SVN连接项目时,可能不需要这样做.键入
y
. - 但是,我这样做是因为我认为交互式提示可能是问题的一部分.
创建一个公钥/私钥,并向Sourceforge注册公钥.
Create a public / private key and register the public key with Sourceforge.
- 有关创建密钥的信息,例如,此处. >
- 如果使用
PuTTY
,请使用PuTTYgen
创建密钥,并确保将私钥加载到pageant
中.具有讽刺意味的是, Launchpad 具有出色的说明. - 通过导航到
Home > Account > Services
并单击Edit SSH Keys for Shell/CVS
,可以在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
.
现在可以使用svn+ssh
协议进行结帐了!
Now a checkout using svn+ssh
protocol should work!
这篇关于SVN + SSH和Sourceforge的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!