Mercurial身份验证缓存?

时间:2010-09-29 02:36:15

标签: authentication mercurial

我的Mercurial服务器需要https身份验证才能获取。如何在不在磁盘上显示纯文本密码的情况下在客户端上缓存我的身份验证信息?

我正在寻找像using sudo with mercurial and ssh authentication这样的东西,但是对于HTTPS。

2 个答案:

答案 0 :(得分:6)

你有没有探究过Mercurial keyring

它支持HTTPS,并与最新版本的TortoiseHg捆绑在一起。如果您没有TortoiseHg,您也可以像任何其他扩展一样安装它(如果您是Windows用户,我建议使用TortoiseHg)。

答案 1 :(得分:-2)

您可以在[auth]中添加~.hgrc部分:

[auth]
foo.prefix = hg.intevation.org/mercurial
foo.username = foo
foo.password = bar
foo.schemes = http https

或者你总是可以使用带有身份验证信息的URL,这在mercurial中与在web浏览器的URL栏中一样有效:

http://user:pass@host.com/path/to/repo/

您将其放入repo的.hg/hgrc文件的[path]部分。