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? 回答1: You can make an auth section in your .hgrc or Mercurial.ini file, like so: [auth] bb.prefix = https://bitbucket.org/repo/path bb.username = foo bb.password = foo