Mercurial Credential Manager Extension

The Mercurial Credential Manager Extension is intended to provide a mechanism to easily integrate Mercurial authentication with OS secure storage, e.g. Windows Vault, and more secure remote authentication methods, such as OAuth and 2FA. By providing a mechanism for Mercurial to make use of 3rd party GUI's to prompt users and amange credentials.

The extension is based on a fork of Mercurial Keyring, and still makes use of much of the code and logic from that project. However the significant difference is that the Mercurial Credentials Manager Extension makes no attempt to directly manage the CRUD of user credentials and secure storage. Rather it provides structured calls out to an external, 3rd Party, application that is expected to prompt the user if necessary for credentials and if applicable securely store and later retrieve these credentials.

If no 3rd party application is found, the Extension does provide a basic command line username/password prompt.

The calls to the external app are based on those defined for communication between Git and it's Credential Managers, see Git Credential and Git Credential manager for Windows


  • Clone this repository
  • Add the following configuration to ~/.hgrc
  • Either
  • Set the Environment Variable MCM_GUI to the full path the GUI application used to manager credentials.
  • Or
  • Place an external executable called 'mercurial-credential-manager.exe' on Windows or 'mercurial-credential-manager' otherwise in the same folder as this extension.
  • This extension requires mercurial_extension_utils.

Who do I talk to?