This extension is not distributed with Mercurial.
Author: Martin Blais
Compatibility: Mercurial 0.9.5 and beyond.
Automatically provide credentials (username/passwords) read from a file.
This is useful to avoid having to type in your password in some repositories. If you are regularly pushing from/pulling into a checkout that is in a shared or public space, and you don't feel comfortable placing your username/password in the .hg/hgrc URL, where others who have access can read them, you can use this to automatically supply the credentials.
The format of the password file is::
realm, uri, username, password realm, uri, username, password ...
The location of the file is '~/.hgpasswd' by default and can be overridden with the environment variable 'HGPASSWD'.
Future work: we could support encrypted files decrypted using gpg (and gpg-agent to avoid having to type your password).
Configure your .hgrc to enable the extension by adding following lines:
[extensions] defpasswd =
Place defpasswd.py somewhere accessible from your PYTHONPATH.
3. Usage Scenario
Pull or push a repository without having to enter your username/password.