如何在我的.hgrc中获得'hg pull'来尊重可信用户部分?

时间:2021-08-14 09:48:09

I'm sharing a Mercurial repo with a user dias, whom I would trust with my life as well as my data. I therefore added

我正在与一个用户dias共享一个Mercurial repo,我相信我的生活以及我的数据。因此我补充道

[trusted]
users = dias, nr

to my ~/.hgrc file. However, when I pull from a remote repo with hg pull -v, I always get this message:

到我的〜/ .hgrc文件。但是,当我从带有hg pull -v的远程仓库中拔出时,我总是得到这样的消息:

remote: Not trusting file /r/c--/papers/gentileset-popl2010/.hg/hgrc from untrusted user dias, group c--
remote: Not trusting file /r/c--/papers/gentileset-popl2010/.hg/hgrc from untrusted user dias, group c--

(I don't know why the message appears twice.)

(我不知道为什么消息会出现两次。)

How to I explain to Mercurial that I really want to trust this file?

如何向Mercurial解释我真的想要信任这个文件?

1 个解决方案

#1


It's on the remote machine that the trust isn't established, and your local .hgrc only affects users on the local machine. Put the trust section line in your remote .hgrc (in your homedir on the machine where the remote repository lives). That, of course, assumes you're using 'ssh://' remote URLs. If you're using 'http://' URLs to access the repository then it's the .hgrc of the apache (or wwwuser or whatever) user on the remote machine that needs to assert trust.

远程计算机上没有建立信任,而本地.hgrc只影响本地计算机上的用户。将信任部分行放在远程.hgrc中(在远程存储库所在的机器上的homedir中)。当然,这假设您正在使用'ssh://'远程URL。如果您使用'http://'URL来访问存储库,则它是远程计算机上需要断言信任的apache(或wwwuser或其他)用户的.hgrc。

#1


It's on the remote machine that the trust isn't established, and your local .hgrc only affects users on the local machine. Put the trust section line in your remote .hgrc (in your homedir on the machine where the remote repository lives). That, of course, assumes you're using 'ssh://' remote URLs. If you're using 'http://' URLs to access the repository then it's the .hgrc of the apache (or wwwuser or whatever) user on the remote machine that needs to assert trust.

远程计算机上没有建立信任,而本地.hgrc只影响本地计算机上的用户。将信任部分行放在远程.hgrc中(在远程存储库所在的机器上的homedir中)。当然,这假设您正在使用'ssh://'远程URL。如果您使用'http://'URL来访问存储库,则它是远程计算机上需要断言信任的apache(或wwwuser或其他)用户的.hgrc。