Archives for: May 2005, 03

May 03, 2005 : Using Cygwin, Keychain, SVN+SSH and TortoiseSVN in Windows

This is verbatim from my friend Andy:

How to use Cygwin, Keychain, SSH and TortoiseSVN together in windows.

A while back, I set up keychain to work under Cygwin so that I could easily manage various SSH keys with ssh-agent, since I prefer to use public keys for authentication.

I think that TortoiseSVN is a useful SVN client with a handy shell extension for Windows.

Recently, I switched Subversion servers to one which requires ssh+svn authentication. Having gotten used to typing my passphrase in once per session, I soon grew tired of punching the whole thing in every time.

Here's how you can set up TortoiseSVN to use SSH keys managed by keychain:

I'll assume you already have WindowsXP (though perhaps other versions would work as well), Cygwin, SSH, Keychain, and TortoiseSVN all installed and working properly, including setting up public/private key pairs and deploying them properly to the target SSH servers, including the svn servers you wish to use. This may not be as easy as it sounds, but there is good documentation on the web sites for each of these tools.

Create a batch file in a convenient location, called something like ssh.bat, containing the following line, replacing the paths to bash and ssh as appropriate:

c:\Cygwin\bin\bash.exe --login -c "/usr/bin/ssh %*"

Now open up the TortoiseSVN settings by right-clicking on a folder in the explorer and browsing the TortoiseSVN context menu.

In the Network tab, set the SSH client to the ssh.bat file just created.

Now, if you haven't already done so, open cygwin. Keychain will ask you for one or more passphrases for your SSH keys. Once the keychain session is created, any further interactive bash sessions will have access to the ssh-agent.

From now on, whenever you attempt to use TortoiseSVN to connect to a Subversion server using svn+ssh authentication which you've set up with your public keys, you won't have to enter a password or passphrase.

<  May 2005  >
Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Categories


Archives

Misc

Syndicate this blog XML

powered by
b2evolution