Setting up SSH (Windows)

Setting up SSH isn't a requirement anymore for using Mercurial Repos on our server, you can push with https and DevZone credentials.

SSH (Secure Shell) is used for commit access to the repository. In order to be granted SSH access you need to generate a SSH public/private key pair first. For this guide we'll be assuming that you installed TortoiseHg.

  • Browse to C:\dev\TortoiseHg and locate the PuttyGen.exe program and start it. A dialog appears.
  • At the bottom of the PuTTY Key Generator dialog, check if the type of key to generate is set to SSH-2 RSA. A 1024 bit key is fine, more is not really necessary.
  • Click the Generate button.
  • Now randomly move your mouse around in the indicated area.
  • As soon as the key pair is generated, the public one is shown in the uppermost textarea. Copy the contents of that area to a new plain text file. Save the file and rename it to (with nickname obviously replaced by your nickname, rsa indicating the key type and 1k indicating the 1024 bit key strength). Do not use the save button, it would make a incompatible Putty key.
  • Next, type and retype a password of your choice in the appropriate fields and click the Save Private Key button. Store the key in a location of your choice. Never share this key with someone else.

Getting commit access

Before you can commit to the repository, the public key you just generated needs to be added to list of allowed keys on the repository server. There are a few people who can do that for you. A Manager of your set knows more about that or get on the IRC channel for more information and/or someone who can authorize your key: irc://

The easiest way to share your public key is by uploading it to the Files section of the set you're intended to work on. If you don't have access to that yet, send the key via email or something.

As soon as your public key is set up at the repository server, you're allowed to connect to it via SSH. And that means that you have write access to the repository!

Next: Configuring TortoiseHg »