自从我使用Mercurial 4.5.3迁移到Ubuntu 18.04之后,我看到了以下警告:
(SHA-1 fingerprint for bitbucket.org found in legacy [hostfingerprints] section; if you trust this fingerprint, remove the old SHA-1 fingerprint from [hostfingerprints] and add the following entry to the new [hostsecurity] section: bitbucket.org:fingerprints=sha256:32:12:90:9a:70:64:82:1c:5b:52:cc:c3:0a:d0:79:db:e1:a8:62:1b:9a:9a:4c:f4:72:40:1c:a7:3a:d3:0a:8c)
现在我理解并感谢你的警告了。然而,我想要让它安静下来。最好通过在.hgrc中添加相应的部分和条目
[hostsecurity]
bitbucket.org:fingerprints=sha256:32:12:90:9a:70:64:82:1c:5b:52:cc:c3:0a:d0:79:db:e1:a8:62:1b:9a:9a:4c:f4:72:40:1c:a7:3a:d3:0a:8c但是,无论我是否将新的[hostsecurity]部分放在旧的[hostfingerprints]部分之前,警告都会继续显示。因此,我正在寻找一种方法来使其静默,最好只针对该主机名和.hgrc内部。
不像一些快乐的人总是可以专门使用最新的发行版版本,我仍然有一些相当老的发行版版本在他们上面运行和Mercurial。因此,旧的条目是必需的,尤其是在那些较旧的Mercurial版本上。
发布于 2019-02-12 23:39:01
首先删除(注释掉) hostfingerprints部分:
# [hostfingerprints]
# bitbucket.org = ..:..:...然后添加新的hostsecurity部分:
hostsecurity]
bitbucket.org = sha256:..:..:... (with whatever the error message suggests)看起来您不能像警告所建议的那样使用bitbucket.org:fingerprints=...节。
https://stackoverflow.com/questions/50157687
复制相似问题