Store password in TortoiseHg

前端 未结 7 1514
情话喂你
情话喂你 2020-12-02 04:07

Is there a way to configure TortoiseHg to store my password?

I have a project hosted on Google Code that I access using TortoiseHg. Whenever I want to push changes t

7条回答
  •  萌比男神i
    2020-12-02 04:41

    Security warning

    Although this answer is accepted as of 2017-09-15, it is not a recommended solution. You should never store your passwords in plain text. Use the mercurial_keyring extension instead. See another answer here.


    You can change your push URL to https://username:password@hostname.com/repo.

    This is explained in Google Code's and Mercurial's FAQs.

    EDIT: Mercurial FAQ explains another way to do it:

    With Mercurial 1.3 you can also add an auth section to your hgrc file:
    [auth]
    example.prefix = https://hg.example.net/
    example.username = foo
    example.password = bar
    

提交回复
热议问题