SVN+SSH in Windows XP
08.06.20This how-to uses the Subversion command-line client, PuTTYGen (you'll be generating a key and placing that on the server), Plink, and Pageant on Windows XP (32 or 64-bit).
I know that this looks like a lot to do, but it's quick, and mostly painless.
Getting the Subversion command-line client
- Select the 'Windows Binaries' link from Subversion's main website.
- Select the 'Apache2.2' link.
- Select the link who's description most closely matches 'Windows installer with the basic win32 binaries'. It should be the first link.
- Run the installer.
Getting PuTTY et. al.
- Google for putty and go to their main site.
- Select the 'Download' link from the menu at the top.
- Select the link under the title 'A Windows installer for everything except PuTTYtel'.
- Run the installer.
Generating the key
- Open PuTTYGen.
- Click 'Generate'.
- Move your mouse around in the box to generate randomness. This creates two parts - the public key and the private key.
- You might want to give the key a passphrase.
- Click 'Save private key'. The location and name of this key for this tutorial is c:\test.ppk.
- Do not close PuTTYGen.
Put the public key on your server
- SSH into your server and edit the file ~/.ssh/authorized_keys
- Right-click on the generated public key in PuTTYGen and choose 'Select All'.
- Right-click on the generated public key in PuTTYGen and choose 'Copy'.
- Paste the clipboard contents onto the end of the authorized_keys file.
- You can close PuTTYGen now and log out of your server.
Setting up svn
- You'll need to find the 'config' file. It's likely in the '%appdata%\Subversion' folder. Just open explorer and enter '%appdata%\Subversion' in the location bar.
- Add the line 'ssh = C:/Program Files (x86)/PuTTY/plink.exe -i c:/test.ppk' under the section tunnels.
- Make sure Pageant is running, and that you have added the generated private key. You will need to provide the passphrase here if you supplied one earlier.
- Use the command 'svn co svn+ssh://user@server/repo' and it should work.