How to save username and password with Mercurial?

后端 未结 8 1848
执念已碎
执念已碎 2020-11-28 00:26

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 followi

8条回答
  •  -上瘾入骨i
    2020-11-28 01:21

    No one mentioned the keyring extension. It will save the username and password into the system keyring, which is far more secure than storing your passwords in a static file as mentioned above. Perform the steps below and you should be good to go. I had this up and running on Ubuntu in about 2 minutes.

    >> sudo apt-get install python-pip
    >> sudo pip install keyring
    >> sudo pip install mercurial_keyring
    
    **Edit your .hgrc file to include the extension**
    [extensions]
    mercurial_keyring = 
    

    https://www.mercurial-scm.org/wiki/KeyringExtension

提交回复
热议问题