This is a step-by-step instruction to setup TortoiseHg (A GUI shell extension for Mercurial SCM) to use with github (online project hosting using git Version Control System).
Introduction
There are few articles around the web with the same topics:
I was able to setup my TortoiseHg to work with github using the instruction written by James McKay. The document is very informative, but some of the steps are not written in details. Thus, I decided to write this document to include some steps with additional screen shots.
Instruction
1. Install TortoiseHg
- Download and install TortoiseHg from here.
2. Install hg-git
hg-git can be download by cloning the repository directly.
3. Configure hg-git
The following steps had to be done by direct editing mercurial.ini file.
4. Create github Account
Create new account at github (if you don't have an account yet), else skip this step.
5. Create SSH Public and Private Keys
github required a SSH key in order to push repository to github.
To generate public and private SSH keys, you will need the PuTTYgen from the PuTTY package. You can get PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. You may choose to download either PuTTYgen.exe or the entire PuTTY package (zip).
- Execute PuTTYgen.exe:
PuTTY Generator
- Click "Generate" to generate new key (1) (Note: Move mouse in application window to generate random values)
- Create password for your key (2) (Optional)
- Save your private key (3)
- Save your public key (4)
Now, you have your own pair of SSH private and public keys pair. Next, you will need to tell github your SSH public key.
6. Register SSH Public Key to github
- Login to github
- Select account settings
github Account settings
- Select "SSH Keys"
github Menu
- Click "Add SSH Key"
github Add SSH Key
- Copy SSH public key from PuTTYgen (5) then paste to Key in github. Give your key a title.
We are now ready to upload our repository to github.
7. Create New Repository in github
Before we can push our repository to github, the repository must be created. Click "Create new Repo" in github page to create new repository.
8. Upload Repository from TortoiseHg to github
That's all. Happy coding!
Version History