首页 文章

使用tortoise SVN通过VPN进行SVN SSH检查,Smartsvn失败

提问于
浏览
3

System & connection details

我使用的是运行Windows 7的64位系统 . 我安装了Open VPN和Tortoise SVN 64位 .

存储库位于远程系统中,我们使用VPN连接 .

What I have done so far

我已按照必要的步骤启动VPN连接 -

  • 在Open VPN安装路径的config文件夹中添加了一些项目特定的配置文件 . 从团队成员的工作设置中获取这些文件 .

  • 使用用户启动了Open VPN连接 .

  • 运行了Putty的Pageant.exe,选择了.ppk文件并输入了密码短语 .

一切都很好到这里 .

然后我去了本地目录并尝试使用Tortoise SVN检出远程存储库URL . 但它会引发以下错误 -

Checkout Failed

To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
Network connection closed unexpectedly

以下是我的Subversion配置文件的[tunnels]部分的内容 -

### Section for configuring tunnel agents.
[tunnels]
### Configure svn protocol tunnel schemes here.  By default, only
### the 'ssh' scheme is defined.  You can define other schemes to
### be used with 'svn+scheme://hostname/path' URLs.  A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined.  The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces.  The command will be invoked as:
###   <command> <hostname> svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as <user>@<hostname>.)  If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh
### If you wanted to define a new 'rsh' scheme, to be used with
### 'svn+rsh:' URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator.  A single backslash will be treated as an
### escape for the following character.

这是错误中提到的部分吗? I can't see any -q option there . 现在应该做些什么 .

注意 - 我也在超级用户上发布了相同的问题 - https://superuser.com/q/295439/50101 . 那里我没有得到任何答案 . 如果应该删除/关闭,请告诉我 .

Update
我尝试使用Smartsvn 6.当Openvpn gui正在运行并且putty pageant正在运行时,我选择了"public/private-key authentication",选择了.ppk文件并输入了密码短语 . 我收到此错误 -

An error occurred while processing an SVN command 
File '\path\to\key-file.ppk' is not a valid OpenSSH DSA or RSA private key file.

有任何想法吗?为什么这个错误?怎么可以修复或任何指针?队友有一个运行Windows xp的32位系统,他们可以结账 . 而我和另一个新成员有一个运行Windows 7的64位系统,面临同样的问题 .

Further Details
用于结账的存储库URL类似于svn ssh://@...com/var/svn/repositories//

队友从未生成任何进一步的钥匙或任何东西 . 他们只是将一些文件放入他们的开放VPN配置文件夹(一些.ppk,.key,.crt和一些打开的vpn配置文件) .

Update 3
使用puttygen生成RSA / DSA密钥时,"type of key to generate"下有3个选项 - > 1. SSH-1(RSA) 2. SSH-2 RSA 3. SSH-2 DSA . 我选择了 SSH-1(RSA) . 点击保存私钥 . 然后再按照相同的步骤进行结账 . 我还选择了 Tortoise SVN - > settings - > Network - > SSH Client - >浏览了 pageant.exe 文件 . 结帐时仍然不成功 - >提示"Couldn't load this key (unable to open file)"然后同样的错误 -

To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
Network connection closed unexpectedly

Update 4
一个新的队友(完全是一个系统,64位运行的Windows 7,和我一样)已成功从远程服务器检出 . 请查看此问题以获取更多详细信息Proper way to debug SVN+SSH checkout over VPN failure? How to compare with a working setup?

2 回答

  • 2

    正如mkro所述, .ppk 证书对Putty来说是独一无二的 . Putty有一个非常方便的工具,可以在 DSARSAPPK 证书之间来回切换,你可以下载here . 几乎每个 Build SSH连接的工具(Putty除外)都将使用 DSARSA 密钥对 .

    如果您使用的是Linux,则可以下载putty源包并自行构建以获取 puttygen 的副本,或者如果您使用的是提供包管理器的发行版,则可以尝试安装它 . 例如,在Ubuntu上,你会这样做:

    $ sudo apt-get install putty-tools
    $ puttygen <your.ppk> -O private-openssh -o <whatever you want to name it>
    
  • 0

    终于自己解决了这个问题!我应该以管理员身份运行OpenVPN GUI .

    我这样做了,它有效 -

    开始菜单 - >从程序列表右键单击“OpenVPN GUI” - >其余全部相同,选择一个配置文件并单击连接(OpenVPN) .

    How I did it
    我尝试安装不同版本的OpenVPN,并且一次保持选中复选框,即"Open Read me" . 它打开了自述文件,有一些像"While using Windows Vista you need to run OpenVPN GUI as administrator"这样的东西 . 我想我也试试这个,虽然我使用的是Windows 7系统,但它确实有效!终于解脱了 . 希望这会帮助别人 .

相关问题