SVN+SSH checkout over VPN using tortoise SVN, Smartsvn failing

主宰稳场 提交于 2019-12-10 17:48:36

问题


System & connection details

I am using a 64-bit system running Windows 7. I have Open VPN and Tortoise SVN 64-bit installed.

The repository is in a remote system, and we connect using VPN.

What I have done so far

I have followed the necessary steps to initiate the VPN connection -

  • Added some project specific config files inside the config folder of the Open VPN installation path. Took these files from working setup of team members.
  • Initiated Open VPN connection using a user.
  • ran Putty's Pageant.exe, selected the .ppk file and entered the pass phrase.

Everything fine upto here.

Then I went to the local directory and tried to checkout the remote repository URL using Tortoise SVN. But it throws the following error -

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

Following are contents of the [tunnels] section of my Subversion config file -

### 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.

Is this the section referred to in the error? I can't see any -q option there. What should be done now.

Note - I had posted the same question on Superuser too - https://superuser.com/q/295439/50101 . I did not get any answers there. Let me know if that should be deleted/closed.

Update
I tried with Smartsvn 6. While Openvpn gui is running and putty pageant is running, I selected "public/private-key authentication", selected the .ppk file and entered the pass phrase. I get this error -

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.

Any ideas? Why this error? How could this be fixed or any pointers? Teammates have a 32-bit system running Windows xp and they are able to checkout. Whereas me and another new member have a 64-bit system running Windows 7, facing the same problem.

Further Details
The repository URL used to take checkout is like svn+ssh://@...com/var/svn/reposito‌​ries//

Teammates never generated any further keys or anything. They simply put some files into their open VPN config folder (some .ppk, .key, .crt and some open vpn config files).

Update 3
While generating RSA/DSA key using puttygen, there are 3 options under "type of key to generate" -> 1. SSH-1(RSA) 2. SSH-2 RSA 3. SSH-2 DSA. I selected SSH-1(RSA). clicked on save private key. Then again followed the same steps to take checkout. I also selected Tortoise SVN-> settings-> Network -> SSH Client -> browsed the pageant.exe file there. Still unsuccessful with checkout-> prompts "Couldn't load this key (unable to open file)" and then the same error -

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
One new teammate (working on exactly a system, 64-bit running windows 7, same as me) has successfully checked out from the remote server. Please check this question for further details Proper way to debug SVN+SSH checkout over VPN failure? How to compare with a working setup?


回答1:


As stated by mkro, the .ppk certificate is unique to Putty. Putty has a very handy tool for going back and forth between DSA, RSA, and PPK certificates, which you can download here. Just about every tool you'll use (other than Putty) that establishes SSH connections will use either a DSA or a RSA key-pair.

If you're on Linux, you can either download the putty source packages and build it yourself to get a copy of puttygen, or if you're on a distribution that provides a package manager, you can try to install it. For example, on Ubuntu, you would do:

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



回答2:


Finally solved the issue myself! I should have run OpenVPN GUI as administrator.

I did this and it worked -

Start Menu -> Right click on "OpenVPN GUI" from program list -> rest all is same, select a profile and click connect (OpenVPN).

How I did it
I tried installing different versions of OpenVPN and one time kept the checkbox checked, which says "Open Read me". And it opened the readme and there was something written like "While using Windows Vista you need to run OpenVPN GUI as administrator". I thought let me try this too, although I am using a Windows 7 system, and it worked! What a relief. Hope this is going to help others.



来源:https://stackoverflow.com/questions/6327364/svnssh-checkout-over-vpn-using-tortoise-svn-smartsvn-failing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!