Daily Archives: January 6, 2010

Using subversion through a ssh tunnel with windows

  • Download and install the PuTTY from here
  • Download and install RapidSVN from here
  • Copy the plink.exe form the PuTTY folder to the RapidSVN/bin folder.
  • Generate a public/private key pair with PuTTYgen and save the two keys to any folder by pressing the ‘any key’.
  • Add the public key to your ~/.ssh/authorized_keys on the svn server. Maybe youe have to correct the format like “ssh-rsa <KEY> user@host“.
  • Create a new ssh session with PuTTY using the following option:
    • host = localhost
    • port = 24
    • connection/data/auto-login username = your username
    • connection/ssh/auth/private key file for authentication = path to your generated private key file
  • Then save this session under the name svn.
  • Generate a new session called tun with this options:
    • host = tunnel server
    • port = 22
    • connection/data/auto-login username = username for the tunnel server
    • in connection/ssh/tunnels/ add: L24 svnserver:22
  • Now tell RapidSVN how to deal with svn+ssh:// URLs:
    • Search your svn config file. For windows 7 its located here: C:\Users\username\AppData\Roaming\Subversion\
    • Open it and goto the [tunnels] section. Then add this line: ssh = $SVN_SSH “C:/Program Files (x86)/RapidSVN-0.10.0/bin/plink.exe”
  • If RapidSVN is already open, then restart it.
  • Start the tun session with PuTTY and login.
  • You can also start the svn session to see if the key auth works. If not, check the authorized_keys file on the svn server.
  • Now you can checkout your repo, with an URL like: svn+ssh://svn/absolute path to repo on svn server/. Here, the ‘svn’ stands for the PuTTY session name.
VN:F [1.9.22_1171]
Rating: 5.0/10 (3 votes cast)
Wir benutzen Cookies um die Nutzerfreundlichkeit der Webseite zu verbessen. Durch Deinen Besuch stimmst Du dem zu.