With Eclipse becoming mainstream even for non-Java applications the need to use svn+ssh URLs become more and more common.
Most HowTos suggest using the graphical subversion client from Tortoise, however I prefer command line for several reasons: reproducability, scriptability, avoiding of unneccessary/unwanted commits.
Subverions' command line variant for windows works great with putty's pageant as SSH agent, if one knows a few crucial things.
Unfortunately some of the steps are unknown enough for the next developer to be show stoppers, so I decided to write this Mini HowTo:
- Install Putty.
- Start the pageant from Putty's start menu group.
- Generate a SSH2 public key or import your existing key to Putty (there's a lot of HowTos in the Web) (usually your key needs to be OpenSSH compatible).
- Add this key to your running pageant.
- Use putty to open an SSH2 connection to the subversion user@server you want to use later. This should work without password interaction!
- Install Subversions command line Windows binary (e.g. svn-1.4.x-setup.exe from here ).
- In your Subversions' config file, i.e. your %APPDATA%\Subversion\config, the section [tunnels] needs a line ssh=plink.
- Check if the subversion installer have put Subversions' bin directory (e.g. C:\Program Files\Subversion\bin) in %PATH% (or do so yourself) and also add the Putty directory (e.g. C:\Program Files\Putty) in the system wide or your own PATH environment variable (control panel, system, advanced, environment variables).
- Start a new command line window (an existing one does not get the extended %PATH%)
- Now you should be able to svn co svn+ssh://email@example.com/var/svn/repository even without password typing ;-))
From: IBCL BLog.
Originally posted: 2007-09-19