I like to use in cygwin the git svn clone
command with our company svn repository.
The url for this is svn+ssh://svn.<url>.com/repo
under this I can see with e.g. eclipse the repository with trunk/tags/branches
Running git svn clone svn+ssh://svn.<url>.com/repo
No such file or directory: Unable to connect to a repository at URL 'svn+ssh://svn..com/repo': Error in child process: exec of 'ssh' failed: No such file or directory at /usr/lib/git-core/git-svn line 2299
Any one can help me what and how to do this ?
For
git-svn
withsvn+ssh
to work you need to ensure that:ssh
client installed on the same machine.svn+ssh://foo@svn.bar.com/project
or you arrange for authentication to occur using ssh keys and perhaps an ssh-agent.The svn+ssh protocol must be setuped using both the private and the public ssh key.
In case of in the Windows usage you have to setup the ssh key before run the svn client using these general steps related to the native Windows
svn.exe
(should not be a ported one, for example, like themsys
orcygwin
tools which is not fully native):putty
client.puttygen.exe
utility and the correct type of the key dependent on the svn hub server (Ed25519, RSA, DSA, etc).SVN_SSH
environment variable with this content:SVN_SSH="<path-to-plink>/plink.exe" -batch -l "<USERNAME>"
. This would avoid hangs in scripts because of interactive login/password request and would avoid usage svn repository urls with the user name inside.externals
properties in them contains valid svn repository urls with thesvn+ssh://
prefix. If not then use thesvn relocate https:// svn+ssh://
command to switch onto it. Then fix all the rest urls in theexternals
properties, for example, just by remove the url scheme prefix and leave the//
prefix instead.pageant.exe
in the background with the previously generated private key (add it).putty.exe
client. The client should not ask for the password if thepageant.exe
is up and running with has been correctly setuped private key. The client should not ask for the user name either if theSVN_SSH
environment variable is declared with the user name.The
git
client basically is a part of portedmsys
orcygwin
tools, which means they behaves a kind of differently.The one of the issues 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.
is the issue with theSVN_SSH
environment variable. The variable should be defined with an utility from the same tools just like thegit
itself. The attempt to use it with the standaloneplink.exe
from theputty
application would end with that message.So, additionally to the steps for the
svn.exe
application you should apply, for example, these steps:SVN_SSH
environment variable and remove it.ssh-pageant
from themsys
orcygwin
tools (theputty
'spageant
must be already run with the valid private key). You can read about it, for example, from here: https://github.com/cuviper/ssh-pageantssh-pageant
from the stdout, for example:SSH_AUTH_SOCK=/tmp/ssh-hNnaPz/agent.2024
.git svn ...
commands together with the user name as stated in the documentation (https://git-scm.com/docs/git-svn#Documentation/git-svn.txt---usernameltusergt ):svn+ssh://<USERNAME>@svn.<url>.com/repo
These instructions should help to use
git svn
commands together with thesvn
commands.