如何在连接到存储库服务器时强制 .hgrc 中的 Mercurial 检查 SHA256 指纹?
在.hgrc中,通常使用SHA1指纹
[hostfingerprints]
foo.bar.baz = a1:b2:c3:d4:e5:f6:11:22:33:44:55:66:77:88:99:00:f9:r8:d7:c6
使用 SHA256 指纹会导致 hg 无法连接:
abort: certificate for foo.bar.baz has unexpected fingerprint 00:11:22:33:44:55:66:77:88:99:0a:0b:0c:0d:0e:0f:a1:b1:c1:d1
(check hostfingerprint configuration)
mercurial 是否总是期望这里有 SHA1,或者这完全通过客户端配置来完成,还是必须在服务器端设置?
例如openssl有 -sha1
和 -sha256
选项。
最佳答案
Does mercurial always expect a SHA1 here
是的。只需重新阅读今天的实际情况 description of hostfingerprints section在 hgrc 中(粗体是我添加的)
The fingerprint is the SHA-1 hash value of the DER encoded certificate.
关于mercurial - hgrc 中的 SHA256 指纹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35242229/