User:Staszyk/SVN over SSH on Windows

From MozillaWiki
Jump to: navigation, search

This page describes how to get SVN over SSH to work on Windows.

You will need:

  • your private key,
  • PuTTY (to authenticate via the SSH tunnel) - the latest version is 0.60,
  • TortoiseSVN (a decent SVN client for Windows).

In short, there are four steps:

  • install PuTTY and TortoiseSVN
  • convert your private key into the format PuTTY understands,
  • create a session information in PuTTY,
  • check out the files from the Mozilla repository using the information stored in the PuTTY session.

Install

Download and install PuTTY and TortoiseSVN. TortoiseSVN will integrate with your Windows shell creating new options in the context menu.

Convert your private key

Once PuTTY is installed, choose PuTTY/PuTTYgen from the Start Menu. This is a little application used to convert open ssh keys into the format used by PuTTY (ppk).

Click the Load button to import your private key. You will need to change the file type option to "All files" in order to see your key. Enter your password when asked to do so. After a successful import, click the "Save private key" button and choose a name and location to save your *.ppk key.

Create session information in PuTTY

Start PuTTY (e.g. from the Start Menu choose PuTTY/PuTTY). Enter the following information:

  • Host name: svn.mozilla.org
  • Port: 22
  • Connection type: SSH
  • Saved sessions: MozillaSVN (choose your own name here, if you like)

In the tree on the left, choose Connection > Data enter:

  • Auto-login username: <your LDAP username (e-mail address)>

In Connection > SSH > Auth, click the Browse... button and choose your *.ppk private key, which you created in step 2.

  • Go back to the Session section of the tree on the left, and click Save, to save the session information.

You can click Open to test the conection. Enter your password and you should see the message that reads: "Thank you for using mozilla subversion server". There is no prompt, since normally there's no shell access. You can close PuTTY, if everything went OK.

Check out the files from the repository

Click anywhere on your desktop or inside the Windows Explorer and choose SVN Check-out. Enter the following URL:

 svn+ssh://MozillaSVN/projects/mozilla-europe.org/trunk/<your locale>

(note: replace MozillaSVN with your session name if you chose to name it differently).

If needed, adjust the path in the Checkout directory field. Hit OK. Enter your pasword (twice) and you're done!

You now have access over the SSH protocol to the Mozilla SVN repository from your Windows machine.


based on http://www.logemann.org/2007/03/13/subversion-tortoisesvn-ssh-howto/