I used Mercurial in a personal project, and I have been typing my username and password every time I want to push something to the server.
I tried adding the followi
mercurial_keyring installation on Mac OSX using MacPorts:
sudo port install py-keyring
sudo port install py-mercurial_keyring
Add the following to ~/.hgrc:
# Add your username if you haven't already done so.
[ui]
username = email@address.com
[extensions]
mercurial_keyring =
No one mentioned the keyring extension. It will save the username and password into the system keyring, which is far more secure than storing your passwords in a static file as mentioned above. Perform the steps below and you should be good to go. I had this up and running on Ubuntu in about 2 minutes.
>> sudo apt-get install python-pip
>> sudo pip install keyring
>> sudo pip install mercurial_keyring
**Edit your .hgrc file to include the extension**
[extensions]
mercurial_keyring =
https://www.mercurial-scm.org/wiki/KeyringExtension