Mercurial installation process under Windows

From Wiki Adele Team
Jump to: navigation, search


To install Mercurial, visit the mercurial website and run the installer.


Visit the Putty official website and run the Windows installer. All you need will be installed in C:\Program Files\PuTTY

ssh public and private key generation

Our servers are using ssh public/private key authentification. That's why, if you don't already have it, you need to generate a public and private ssh keys.

You will need:

  • A public key, in the UNIX format, to be given to Etienne Gandrille for authentification on the server;
  • A private key, in your OS format.

To do this, you can use the tutorial ssh public and private key generation.

Mercurial.ini file

A mercurial.ini file should be created in /documents and settings/[your user]/mercurial.ini

ssh="C:\Program Files\PuTTY\plink.exe" -ssh -i "C:\path\to\your\private\key.ppk"
username = Alice Dupont <>

hgext.graphlog =

i Mercurial can have difficulties to find the mercurial.ini file, if there are special characters or accented letters in the path. For this reason, it's better not to have special characters in your Windows user name.

Using Mercurial in command line


pageant.exe is a tool provided with Putty, which keeps in memory your pass phrase, to prevent you from typing it everytime. We are going to use this tool.

  • Run pageant.exe
  • Click on Add Key
  • Select your private key
  • Enter the pass phrase

Let's try hg!

In the command line, you can now play with hg!

For example, il you want to clone a repository, just type : hg clone ssh://hg@henry/your_repository