Visual Studio 2015 和 Git:基础连接已关闭:无法为 SSL/TLS 安全通道建立信任关系

Visual Studio 2015 and Git: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

我正在使用 Gitlab 和 Visual Studio 2015,当我将更改推送到 Gitlab 项目时,我收到下一个错误:

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Inner Exception:
    The remote certificate is invalid according to the validation procedure.

为了设置我的项目,我遵循了以下步骤:

  1. 在 Gitlab 中创建一个项目。
  2. 将这个项目克隆到我的文件夹中。在此步骤中,我需要使用下一个命令:

    git config --global http.sslVerify false

  3. 我在这个文件夹中创建了一个项目。

  4. 我检查了存储库设置,遥控器是正确的。
  5. 我提交了本地存储库。
  6. 我试图将此提交推送到远程,但我遇到了上述错误。

据我所知,Visual Studio 使用 LibGit2 来处理安全检查,并且它有一个功能来验证连接,it's never used and ifdeffed out

如果我没记错的话Visual Studio 包装连接,但产品中没有禁用 SSL 安全性的设置。

相反

  • 为什么不修复证书,SSL 证书不像以前那么贵
  • 为什么不将证书作为受信任的根证书导入到 Windows 证书存储中,将其添加到用户的受信任证书列表中?
  • 如果您的证书有效,为什么不确保您使用的是正确的远程名称