0

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
dak
  • 339
  • 6
  • 21

1 Answers1

2

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.

slowdog
  • 6,076
  • 2
  • 27
  • 30
  • My understanding is that, when given the URL svn+ssh://127.0.0.1, subversion uses the ssh definition in the subversion config file i.e. ssh = C:/Program Files/TortoiseSVN/bin/Tortoiseplink.exe -v -l user -pw passw -L 3690:1.2.3.4:3690 mydomain.com – dak Apr 16 '12 at 22:40
  • That's correct. But subversion adds the host name "127.0.0.1" to that commandline, so the end result is nothing useful. This handling of the "ssh" setting is explained by the comments in the default config file, and the section about "custom tunnel behaviors" here http://svnbook.red-bean.com/nightly/en/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth – slowdog Apr 17 '12 at 12:31
  • Is it possible, from `TortoiseSVN or Subclipse`, to specify `(-L 3690:1.2.3.4:3690)` to Forward the local port to the remote address? Or do I need to run `plink -v -l user -pw passw -L 3690:1.2.3.4:3690 mydomain.com -N` in a cmd window and then issue svn commands with TortoiseSVN or Subclipse; – dak Apr 17 '12 at 22:26
  • No, I don't think it's possible to have those programs automatically create the tunnel. Configuring the server for svn+ssh access is probably the easiest option: Then you won't need a tunnel at all. – slowdog Apr 19 '12 at 11:08