问题描述
是否可以配置 TortoiseHg 来存储密码?
Is there a way to configure TortoiseHg to store my password?
我有一个托管在 Google代码上的项目,该项目可以使用TortoiseHg访问.每当我想将更改推送到Google Code TortoiseHg时,都会提示我输入用户名和密码. Google代码要求我使用自动生成的密码,并且每次查找都非常重复.
I have a project hosted on Google Code that I access using TortoiseHg. Whenever I want to push changes to Google Code TortoiseHg prompts me for a username and password. Google Code requires me to use an auto-generated password, and it gets quite repetitive to look it up every time.
推荐答案
安全警告
尽管自2017年9月15日起接受此答案,但这不是推荐的解决方案.永远不要以纯文本形式存储密码.请使用mercurial_keyring
扩展名.在此处查看另一个答案.
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.
您可以将推送URL更改为 https://username:[email protected]/repo .
You can change your push URL to https://username:[email protected]/repo.
Google Code的内容和 Mercurial的常见问题解答.
Mercurial FAQ解释了另一种方法:
Mercurial FAQ explains another way to do it:
[auth]
example.prefix = https://hg.example.net/
example.username = foo
example.password = bar
这篇关于将密码存储在TortoiseHg中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!