Attempting to check out a repository using svn checkout svn+ssh://USER@REPO .
I have set my %SVN_SSH%
variable to include the -v
flag when calling plink.exe
, and the last log I get is Using username "USER".
After that the command line hangs indefinitely.
I get similar problems attempting to checkout the repository using TortoiseSVN and the Subversion integration in Intellij.
I have no problems connecting to the server using PuTTY or calling plink
directly in the command line. Using the -v
flag with plink
, I get prompted for my password immediately after the line where it hangs using svn checkout
.
I have Windows 7 Ultimate SP 1, svn version 1.8.13, plink release 0.60.
The problem seems to be that you have to use public key authentication for SVN to be able to use SSH in Windows properly.
There are a few tutorials online for how to do this, but the one that worked for me was this one: http://support.suso.com/supki/SSH_Tutorial_for_Windows
The important difference, which I didn't find in other tutorials, was the usage of the chmod
command to change access permissions to the public key file on the server.
It might be too late to say, but i've had the similar problem. In mine case the issue was in the command line of the plink.exe
.
To properly fix all issues and do not type infinite logins and passwords:
pageant.exe
to add the ppk key and avoid manual input of the password.SVN_SSH
environment variable with the -l "<username>"
parameters to avoid manual input of the user name and avoid usage the username in the svn repository url.SVN_SSH
environment variable with the -batch
parameter to avoid hangs in a script mode. The resulting SVN_SSH
environment variable should look like this:
SVN_SSH="<path-to-plink>/plink.exe" -batch -l "<USER>"
warning : backslash character in a path in the SVN_SSH
variable is an escape character, you have to use a double to self escape it or replace it a forward slash - /
.
But be careful with the git svn
command, because the SVN_SSH
variable can break the git with the message:
Can't create session: Unable to connect to a repository at URL 'svn+ssh://...': Error in child process: exec of '' failed: No such file or directory at .../Git/mingw64/share/perl5/Git/SVN.pm line 310.
In that case you have to use the ssh-pageant
from the msys
or cygwin
tools instead.
I've create another post with detailed description on how to do that step by step both for the svn.exe
and git.exe
: How to use git-svn with svn+ssh url
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.