How to do http + ssh with Subversion on Windows

Posted by Adam Sat, 28 Jul 2007 01:31:00 GMT

Many public hotspots block svn traffic, even those accessed via http. This predicament can lead many (like me) that must develop in a Windows-based environment in an unfortunate place while on the road.
Accessing subversion shares, need not be a headache, there is a simple solution.

First you should install TortoiseSVN and verify it is working.

Then right click on the desktop (or an explorer window) highlight “TortoiseSVN” then click Settings.

Click the “Network” tab

Check the “Enable Proxy Server” box, and in the “Server Address:” field place “localhost” and in the “Port” field place an unused port greater than 1024 (remember this number!). Click “Apply” then “OK”

I recommend Putty Tray and their suite, including their improved version of Pagaent, for reasons that will soon become obvious for the next section.

Open Pageant, then open your keyfile in it.

Continuing on, open up Putty, fill in your server address (make sure SSH is filled in). Then go to Connection -> SSH -> Tunnels. Under “Source Port” place the same number you filled in earlier, and in destination, place the address of your server and port 80, ie: my.server.net:80, Click Add. Go back too the session tab, save and name your connection (don’t want too do this every time).

Click Open.

You should then be able too use TortoiseSVN normally, though remember you will always need the SSH connection running too use it, it will not work otherwise (unless you clear the proxy in the settings).

This is why Putty Tray is so great, you can minimize it too the system tray, and have one less window cluttering your developing environment, until you absolutely need too do something on that command line.

As a ‘best practice’ rule, I have learned too set the background colour on my tunnel window to something other (and obviously not) black, and not use it for much of anything besides tunnels.

Good Luck!

References:

  1. How to do HTTP+SSH with Subversion on Linux