How do I set my username and password for Mercurial (no more prompting please)?

My new project uses Mercurial as the source control. The daily pull of data becomes a little tedious when you are constantly prompted for credentials. I have add a few simple settings to resolve the (annoying) problem.

Open the workbench, right click on the repository and select settings. The name of the settings file is displayed at the top of the repository settings page.

My location was c:\MyProject\.hg\hgrc

Now, open this file in your favourite text editor and add a few simple entries:

[ui]
username=Richard Leeman <richard@leeman.com>

[auth]
repo.prefix=http://myrepositorylocation/code
repo.username=Richard Leeman
repo.password=P@$$w0rd

This is not the most secure way to store the credentials, but it certainly beats having to enter them every time.


Comments

Popular posts from this blog

SharePoint 2013: Error updating managed account credentials

Error deploying Nintex workflow: An item with the same key has already been added