【问题标题】:I Cannot clone a git repository我无法克隆 git 存储库
【发布时间】:2018-11-23 02:25:01
【问题描述】:

我正在尝试从我们公司的 git 服务器克隆一个 git 存储库并获取:

Cloning into 'C:\git\<name_of_repository>...
fatal: unable to access '<corporate_git_server_url>/<name_of_repository>.git/': schannel: CertGetNameString() failed to match connection hostname (<corporate_git_server_url>) against server certificate names.

显然证书有问题,但我不知道去哪里找。也很奇怪,因为我的同事成功检查了存储库。

【问题讨论】:

  • 您能否向我们提供您用于克隆 repo 的完整命令(显然要编辑任何敏感信息)
  • 我尝试使用 github 桌面应用程序来做到这一点
  • 您使用 GitHub 桌面版吗? (不是命令行)
  • 我也有同样的问题。

标签: git repository clone


【解决方案1】:

推送到 visualstudio.com 上的存储库时,我遇到了同样的错误。

正如它所暗示的,schannel 获取证书信息存在某种问题。

显然是you can change git's https transport。我将我的从 schannel 更改为 openssl,它解决了这个问题。

>git config --global http.sslBackend "openssl"

【讨论】:

  • 谢谢,这对我有用。我在尝试通过桌面客户端通过 GitHub Enterprise 签出项目时收到 schannel 错误。更新全局 .gitconfig 修复了它。这应该是公认的答案。
猜你喜欢
  • 1970-01-01
  • 2021-09-01
  • 2023-04-01
  • 2013-04-19
  • 1970-01-01
  • 2019-09-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多