Mercurial似乎忽略了它的配置.hgrc,为什么?

时间:2017-06-02 15:16:55

标签: mercurial

我预先配置了登录/传递给我的.hgrc数据,尽管mercurial忽略了它:

[auth]
becpg.prefix = https://becpg.fr/hg/becpg-community
becpg.username = read-only
becpg.password = read-only

尝试克隆它,我明白了:

$ hg clone https://becpg.fr/hg/becpg-community
http authorization required for https://www.becpg.fr/hg/becpg-community
realm: beCPG repositories
user: 

手动向他提供登录名和密码,可以毫无问题地接受。

在Mercurial过程中,我发现是的,它在我的家中找到了我的.hgrc,并将其读入:

15751 open("/home/myusername/.hgrc", O_RDONLY) = 3
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 lseek(3, 0, SEEK_CUR)             = 0
15751 lseek(3, 0, SEEK_CUR)             = 0
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 read(3, "[auth]\nbecpg.prefix = https://becpg.fr/hg/becpg-community\nbecpg.username = read-only\nbecpg.password = read-only\n", 4096) = 112
15751 read(3, "", 4096)                 = 0
15751 close(3)                          = 0

可能是什么原因?

1 个答案:

答案 0 :(得分:2)

$ hg clone https://becpg.fr/hg/becpg-community
http authorization required for https://www.becpg.fr/hg/becpg-community

您尝试从becpg.fr克隆,然后授权要求www.becpg.fr

我相信你被重定向了。 试试这个:

[auth]
becpg.prefix = www.becpg.fr/hg/becpg-community
becpg.username = read-only
becpg.password = read-only