Keep [C]*(od|do)ing

February 15 th

1

Configure svn+ssh on Windows

Filed under: Tools, software — Tags: , — Liwen @ 8:52 pm

As a proud command line junkie, I never went anywhere without my Emacs ssettings, which made my hands look like old branches from dead tree in some desert, but that’s fine for me, it’s been a decade since I ceased my hand moulding career.

Ok It’s a lie but seriously, I am not a big fan of mice and GUI, they usually slow me down and distract me from concentrating. Besides, some really bad designed HCI, such as Windows Vista UAC, can easily push my buttons in all circumstances. People from Microsoft said

“Disabling UAC risks your computer for allowing some worms to execute commands secretly without a prompt confirmation from end user.”

and I up voted this as the correct answer:

“Enabling UAC risks me throwing my computer out the window from frustration with a poorly designed and horribly executed security model.”

Forgive me being loquacious, the point here is I don’t want to use TortoiseSVN – I 100% agree with you that it’s a fantastic software, I do! I just need to get svn+ssh work with my Emacs shell mode.

Let’s get started.

1. Download Putty, if you are like me always afraid of installing untrusted software from the Internet because you believe that they are mostly badly written piece of crap that they would mess your already rubbished Windows OS completely then you can be greatly relieved here, I promise.

2. Start Puttygen.exe and generate a pair of keys, save the private key WITHOUT passcode,

3. Copy the public key, yes COPY not SAVE, paste/append it to $HOME/.ssh/authorized_keys, create the file if it doesn’t exist.

4. After modified the authorized_keys file, remember to:

chmod 700 authorized_keys
chmod 600 .ssh

This is important as you may get connection errors if the file is group writable.

5. Next, test the connection with putty.exe or plink.exe, (side note:TortoiseSVN has a plink.exe windows implementation which would not pop up messages.)
plink.exe -i theprivatekey.ppk username@hostname

6. Modify your subversion configuration file. It’s in
c:\Users\yourname\AppData\Roaming\Subversion in Windows Vista
add the following line to your [tunnels] section:
ssh=x:/path/plink.exe -i x:/path/privatekey.ppk

Now you should be able to access your svn+ssh repository without typing password, in Microsoft Windows! Vista!

Some extra info for folks who love GUI – for TortoiseSVN users, you need to generate the OpenSSH private key from server, then load it with puttygen.exe and get the public key – it’s due to the fact that there are differences between private key implementations in putty and OpenSSH, otherwise you will get the lovely “server refused our key” message!

1 Comment »

  1. [...] Related Posts: 1. Install Subversion 1.5.5 on Bluehost 64bit Box 2. Configure svn+ssh on Windows [...]

    Pingback by Passwordless svn+ssh access in Mac OS X « Keep [C]*(od|do)ing — May 3, 2009 @ 8:58 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by Wordpress | All rights reserved, all wrongs observed. @ 2009 Liwen Zhang (17 queries. 0.279 seconds.)