将密码存储在TortoiseHg中 [英] Store password in TortoiseHg

查看:102
本文介绍了将密码存储在TortoiseHg中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以配置 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:password@hostname.com/repo .

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

Google Code的内容和Mercurial FAQ解释了另一种方法:

Mercurial FAQ explains another way to do it:

使用Mercurial 1.3,您还可以将auth部分添加到hgrc文件中:
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

这篇关于将密码存储在TortoiseHg中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆