mercurial - 如何摆脱这个 Mercurial 警告?(主机安全/主机指纹)
问题描述
由于我使用 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]
,警告都会继续显示。因此,我正在寻找一种使其静音的方法,最好仅针对该主机名和 inside .hgrc
。
与总是可以只使用最新发行版的一些快乐的人不同,我仍然运行着一些相当旧的发行版和 Mercurial。所以旧条目是必需的,尤其是在那些旧的 Mercurial 版本上。
解决方案
首先删除(注释掉)该hostfingerprints
部分:
# [hostfingerprints]
# bitbucket.org = ..:..:...
然后添加新的主机安全部分:
hostsecurity]
bitbucket.org = sha256:..:..:... (with whatever the error message suggests)
看来您不能bitbucket.org:fingerprints=...
像警告所建议的那样使用该节。
推荐阅读
- javascript - Updating Const variable thorough another file
- android-studio - 将 LIBGDX 库 gdx-backend-android.jar 导入 Android Studio 项目
- scala - Spark:RuntimeException:java.lang.String 不是日期模式的有效外部类型
- c++ - 根据另一个字符串的顺序对一个字符串进行排序
- javascript - jupyter notebook 滚动到选定的单元格
- python - 硒无法点击下一页
- angular - 根据多个选定的单选按钮计算总价 - Angular 9/10
- data-manipulation - 根据ID随机删除和添加行
- python - 单独工作或与所有其他参数一起工作的可选标志(如 -h)
- ios - iOS 在 Apple Silicon 上运行 - 打开文件的邮件未放置在“文档/收件箱”中