Setting up Windows to access Subversion over SSH

Posted by mike on February 28, 2008

I will try to cover the steps involved in setting up Windows with a Subversion client that will access over ssh.

Tools needed:

  • Tortoise
  • PuTTY
  • PuTTYgen
  • Pageant
  • WinSCP

I will assume that you have some knowledge of logging in to the remote Linux machine and that you have Subversion and ssh already working.

The following steps need to be done from the command prompt on the Linux machine that is running your Subversion repository. You need to be logged in as the user you want to access the repository with. For this tutorial, I’ll use the username huckleberry. You should not be logged in as root.

  1. Execute the command ’ssh-keygen -f akey’
  2. When prompted, type the passphrase that you want to use to log in. (This can be left blank, but I don’t recommend it)
  3. Type ‘mkdir .ssh’ (If you get an error that the directory already exists, just go to the next step)
  4. Type ‘cat akey.pub >> .ssh/authorized_keys’
  5. Type ‘chmod 600 .ssh/authorized_keys’

These next steps need to be done on the Windows machine that you are setting up access for:

  1. Open PuTTY
  2. Enter the hostname or IP address of your Subversion server, verify the connection type is set to SSH, and enter a name to call your new session in the ‘Saved Sessions’ textbox. I’ll call mine mysvn.
  3. Click the Save button
  4. You should now be able to use the open button to open a session to your Subversion server.
  5. Next you need to copy the private key to your machine. I use WinSCP to secure copy the file ‘akey’ to my desktop.
  6. Start PuTTYgen and choose Conversions from the menu bar, then Import key.
  7. Type the passphrase you assigned the key when you created it on the Linux box.
  8. Click the ‘Save private key’ button
  9. Choose an appropriate location to store your key and save it naming it something like akey.ppk
  10. Start Pageant, it will bring up a little computer with a hat icon in your status bar, next to your system clock
  11. Right click the icon and choose Add key
  12. Find your newly saved key (akey.ppk) and choose Open
  13. Type your passphrase
  14. Assuming you have installed Tortoise, bring up something like your Documents directory
  15. Right click in the file pane (not sure if that’s what it’s really called, but folders are in the left pane and files are in the right one) and choose TortoiseSVN/Repo-browser
  16. For the URL you will use svn+ssh://huckleberry@mysvn/var/svn/myProject (replace /var/svn/myProject with the path to the repository you want to access)
  17. You should be able to browse the files in your repository

That’s it! You should now be able to checkout, commit, etc. using a URL path like the one above. When you reboot, or shutdown Pageant you will need to start it again and add your key back.

I recommend that you go back to your shell and delete the private key that you generated.

.NET 3.5 Failed to Install on Vista x64

Posted by mike on February 10, 2008

I came across an issue while rebuilding my computer and trying to install Visual Studio 2008. I did all of the Windows updates before starting to install any software, which seems to have been the cause for this issue. When I started the Visual Studio installer, it got to where it installs the .NET 3.5 framework and eventually throws an error. After searching the Internet I found others that had the same issue. It seems to be related to a critical update for Vista, KB110806. It’s apparently a fix for .NET 2.0 that MSDN lists as being a component of .NET 3.5.

Anyway, here is what I did to get around it:

  1. Go to Windows Update
  2. Choose Change settings from the list on the left
  3. Set to "Download updates but let me choose whether to install them"
  4. Click OK
  5. Go to Control Panel
  6. Choose "Uninstall a program" under Programs
  7. Choose "View installed updates" from list on the left
  8. Find KB110806 in list, click, and choose Uninstall
  9. Reboot

The first time I tried this, I neglected steps 1 - 4 and Vista managed to reinstall the update immediately after I removed it.

At this point I downloaded and installed the .NET 3.5 framework. After that Visual Studio 2008 installed without any further issues. You may want to go back and look at steps 1 - 4 if you want to turn auto updates back on.