Subversion is a very nice tool. I hated source code repositories until subversion. Now I am a true believer. Or is it just that I’m getting older and more conservative experienced with my work? Doing commits over svn+ssh makes installation on a linux server (especially an Ubuntu one) trivial. An svn client on an Ubuntu box with ssh at most requires libneon to be installed. And not even that much I think with the latest version of Ubuntu.
Getting subversion to work on windows with svn+ssh is not so trivial. Not because it doesn’t work correctly, but at time of writing, there is not a lot of information about the gotcha’s that exist due to it being a unix project ported across to windows.
The main issue is the fact that svn+ssh naturally relies on ssh being on the machine. In the case of *nix, its almost there by default. In the case of windows, this is not so. So first and foremost you need to install a working ssh client on the Windows client. PuTTY or install TortoiseSVN to get TortoisePlink.exe.
Next you’ll need to ensure that subversion on windows can find the ssh client of choice. You will need to edit the subversion config file that will be found in C:\Documents and Settings\<username>\Application Data\Subversion\ and is named config (In vista: c:\users\<username>\Application Data\Subversion). In the file uncomment the [tunnels] section and uncomment or add the line:
ssh = TortoisePlink.exe
Add the path to TortoisePlink.exe in the system path environment variables and open a new command prompt window to get the path changes.
It has been noted elsewhere that if you want to supply an actual path to the ssh client (rather than having the directory in the PATH environment variable as I have done), you need to do it with unix frontslashes and not backslashes. This apparently gets a lot of people.
Now, after all of this you should be ready to checkout your code. This is where I got stuck for hours due to spending all of my time on Ubuntu and MacOS lately and having the same account name on my local box as on my development server.
In your checkout command you need to specify the username as well!
svn checkout svn+ssh://username@127.0.0.1/where/your/repository/is/ nameofproject
What was happening without specifying the username was that the windows ssh client was whinging that it didn’t have a username and throwing up a dialog which couldn’t be seen due to the fact that I was running subversion from the command line. If you specify the username you get a dialog that asks for the password and then you should be good to go.