How to save username and password with Mercurial?

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 following to the .hgrc file in my home directory, but it seems to be completely ignored.

[ui]
username = MY_USER_NAME
password = MY_PASSWORD

How to do this the right way?

8 Answers
8

Leave a Comment