在 TortoiseHG 中禁用内部自签名证书的 HTTPS 主机身份验证

发布于 2024-11-14 22:53:56 字数 285 浏览 3 评论 0原文

如何在 TortoiseHG 中禁用内部自签名证书的 HTTPS 主机身份验证。对于内部服务器,HTTPS 主要用于加密。

TortoiseHG 文档表示可以禁用主机验证(即针对证书颁发机构链的验证)这里但我似乎找不到该选项。

它应该是克隆远程存储库时的一个选项。我使用的是最新的TortoiseHG 2.0.5

How do you disable HTTPS host authentication in TortoiseHG for internal self-signed certificates. For internal servers HTTPS is primarily used for encryption.

The TortoiseHG documentation says that it is possible to disable host verification (i.e. verification against the Certificate Authority chain) here but I can't seem to find the option.

Its supposed to be an option when cloning a remote repository. I am using the latest TortoiseHG 2.0.5

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

琉璃繁缕 2024-11-21 22:53:56

在 TortoiseHG 工作台的“同步”选项卡(或在“同步”屏幕)中,如果您选择了远程路径,您应该会看到一个带有锁定图标的按钮:

在此处输入图像描述

这将打开安全窗口,您可以在其中选择选项无主机验证,但仍然加密以及其他设置。当您打开它时,它会在您的 mercurial.ini 中添加类似的内容:

[insecurehosts]
bitbucket.org = 1

这是 TortoiseHg 的机器级配置,但它似乎不会影响克隆窗口。

在命令行上,您可以使用 --insecure 跳过验证证书:

hg clone --insecure https://hostname.org/user/repository repository-clone

这将发出许多有关不验证证书的警告,并且还会在每条消息中显示主机指纹,就像下面的示例警告(为了便于阅读而从原始格式格式化):

warning: bitbucket.org certificate with fingerprint 
 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified
 (check hostfingerprints or web.cacerts config setting)

但是,更好的选择是 主机指纹,由 hg 和 TortoiseHg 使用。在 TortoiseHg 的安全窗口中,无主机验证上方是选项使用存储的主机指纹进行验证。 “查询”按钮检索主机证书的指纹并将其存储在 mercurial.ini 中:

[hostfingerprints]
bitbucket.org = 81:2b:08:90:dc:d3:71:ee:e0:7c:b4:75:ce:9b:6c:48:94:56:a1:fe

这应该跳过证书的实际验证,因为您声明您已经信任该证书。

有关证书的此文档也可能有所帮助。

In the TortoiseHG Workbench, in the Sync tab (or in the Sync screen), if you have a remote path selected, you should see a button with a lock icon on it:

enter image description here

That will bring up the Security window, where you can select the option No host validation, but still encrypted, among other settings. When you turn that on, it adds something like this to your mercurial.ini:

[insecurehosts]
bitbucket.org = 1

That's machine-level config for TortoiseHg, but it doesn't seem to affect the Clone window.

On the command-line, you can use --insecure to skip verifying certificates:

hg clone --insecure https://hostname.org/user/repository repository-clone

This will spit out a number of warnings about not verifying the certificate, and will also show you the host fingerprint in each message, like the example warning below (formatted from the original for readability):

warning: bitbucket.org certificate with fingerprint 
 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified
 (check hostfingerprints or web.cacerts config setting)

A better option, however, is host fingerprints, which are used by both hg and TortoiseHg. In TortoiseHg's Security window, above No host validation is the option Verify with stored host fingerprint. The Query button retrieves the fingerprint of the host's certificate and stores it in mercurial.ini:

[hostfingerprints]
bitbucket.org = 81:2b:08:90:dc:d3:71:ee:e0:7c:b4:75:ce:9b:6c:48:94:56:a1:fe

This should skip actual verification of the certificate because you are declaring that you already trust the certificate.

This documentation on certificates may help, as well.

甜柠檬 2024-11-21 22:53:56

在“克隆存储库”窗口中展开选项并选中“不验证主机证书”复选框。

In the Clone Repository window expand options and check "Do not verify host certificate" check box.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文