Search code examples
svnsshtortoisesvnsubclipseportforwarding

svn+ssh with Subclipse or TortoiseSVN


If I run plink in a cmd window with -N option

C:\Program Files\Putty>plink -v -l user -pw passw -L 3690:1.2.3.4:3690 mydomain.com -N

the remote svn repository (svn://127.0.0.1) can be accessed with TortoiseSVN and Subclipse

Put the following in your Subversion config file:

ssh = C:/Program Files/TortoiseSVN/bin/Tortoiseplink.exe -v -l user -pw passw -L 3690:1.2.3.4:3690 mydomain.com

the remote svn repository (svn+ssh://127.0.0.1) cannot be accessed from TortoiseSVN or Subclipse

Putty Fatal Error
Network error: Connection refused

TortoiseSVN Error
Unable to connect to repository at URL 'svn+ssh://127.0.0.1

Solution

  • You seem to be misunderstanding the relationship between the svn:// and svn+ssh:// access methods.

    Using svn://, subversion expects to find an svnserve process listening on port 3690 of the specified host. It will connect to that port and speak the subversion protocol.

    The plink commandline you mention opens an SSH session across which connections to port 3690 are tunneled. So, when you run that command, the URL svn://127.0.0.1 will connect you to your repository as long as plink remains running.

    Using svn+ssh://, on the other hand, subversion expects to find an SSH server. It will open an SSH connection, use that connection to start a new svnserve, and then speak the subversion protocol.

    So, when given the URL svn+ssh://127.0.0.1, subversion attempts an SSH connection to localhost. That is not what you want.

    If your server is configured for svn+ssh access then the URL svn+ssh://mydomain.com should work.