Darren’s Blog

Think Tank

22 Mar

Tortoise Subversion and svn+ssh


Tortoise Subversion and svn+ssh – The Final Solution. ahhh

Getting Tortoise Subversion and svn+ssh working on Windows is a six-step process.

1) Install cygwin.

  • Goto the cygwin main site (http://www.cygwin.com/) and click on intall.
  • Select of local folder where to install cygwin. We will refer to this folder as CYGWIN_HOME
  • In the package selection tree, navigate under “Net” and check “openssh”
  • Finish the installation of cygwin

2) Install TortoiseSVN

  • Goto the main tortoise site : http://tortoisesvn.tigris.org/
  • Download and install the latest version of TortoiseSVN
  • Reboot you computer

3) Create your encryption keys

  • Open a cygwin bash window
  • Run: ssh-keygen -t rsa

Choose a safe passphrase

4) Send your public key to the svn administrator

The public key file to send is located in your cygwin home:

CYGWIN_HOME\home\YOUR_WINDOWS_USERNAME\.ssh\id_rsa.pub

5) Setup TortoiseSVN to use cygwin ssh

  • From the Windows Explorer, right click on any folder. Select: TortoiseSVN/Settings
  • In the settings window, pick Network. In the SSH section, hit browse to point to cygwin ssh.
  • In the file browser, select CYGWIN_HOME\home\bin\ssh.exe

6) Setup the ssh agent

The ssh agent will save you from typing your password everytime you use subversion.

  • Open a cygwin bash
  • Type : ssh-agent bash
  • Type : ssh-add

You will be prompted to enter your passphrase

  • Type : set | grep -i SSH

You will get values for two bash environment variables: SSH_AGENT_PID and SSH_AUTH_SOCK

  • Minimize (don’t close) the bash window

Next, you need to replicate these two variables for windows applications.

  • From the Windows desktop, right-click on MyComputer
  • Select the Advanced tab
  • Click on Environment Variables
  • Create two variables SSH_AGENT_PID and SSH_AUTH_SOCK with their values from the bash shell
  • Restart Windows Explorer

Note : Step 6 needs to be manually performed each time you reboot or logon


Filed under: Uncategorized

Sorry, comments for this entry are closed at this time.