【问题标题】:Git Clone Fails with sslRead() error on OS X Yosemite在 OS X Yosemite 上,Git 克隆失败并出现 sslRead() 错误
【发布时间】:2015-05-21 23:19:07
【问题描述】:

我目前在 OS X Yosemite 10.10.3 上,并尝试 git clone 一个在 Windows 上运行良好的现有 repo。我尝试了通过自制软件和 curl/openssl 安装 git 的组合,但没有成功。当我运行 git clone 时,我收到以下 ssl 读取错误:

GIT_CURL_VERBOSE=1 git clone http://myURL/gitlab/project/project.git

> remote: Counting objects: 1641, done. remote: Compressing objects:
> 100% (1588/1588), done.
> * SSLRead() return error -98061641), 136.73 MiB | 1.71 MiB/s    
> * Closing connection 2 remote: Total 1641 (delta 910), reused 0 (delta 0) error: RPC failed; result=56, HTTP code = 200 Receiving objects:
> 100% (1641/1641), 137.48 MiB | 1.64 MiB/s, done. Resolving deltas:
> 100% (910/910), done.

我试过同时使用 Https 和 Http 都没有运气。有没有其他人遇到过类似的事情?

如果有帮助,下面是 git、curl 和 openssl 版本的输出。

curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz 

git --version
git version 2.4.1

openssl version
OpenSSL 0.9.8zd 8 Jan 2015

提前感谢您的任何指导!

【问题讨论】:

  • This post 可能有用。
  • http://myURL/gitlab/project/project.git - 请发布您用于连接服务器的确切 URL。通过单击编辑将其添加到您的问题中(不要将其作为评论发布)。否则,没有足够的信息来帮助解决问题。
  • 感谢您的输入,不幸的是,我无法将确切的 URL 发布为私有 repo :(。但是,它是一个带有标准 repo 的 gitlab 实例,没什么特别的。我能够从这个 repo 克隆Windows 和其他操作系统,出于某种原因,不是优胜美地。
  • JavaBrett - 您的链接让我接近答案,谢谢!

标签: git curl openssl osx-yosemite gitlab


【解决方案1】:

Javabrett 的链接让我得到了答案,它围绕 Yosemite 使用了不正确的 SSL 依赖项,而 Git 最终使用了该依赖项。

使用这些标志通过 homebrew 安装 Git 有效:

brew install git --with-brewed-curl --with-brewed-openssl

或者:

brew reinstall git --with-brewed-curl --with-brewed-openssl

【讨论】:

  • 您可能还需要 curl--with-openssl 选项(在 OS X 10.11 全新安装上)。
  • 我需要使用上述选项卸载并重新安装 git 和 curl。谢谢!
【解决方案2】:

如果在上述答案 (brew reinstall git --with-brewed-curl --with-brewed-openssl) 不起作用之前没有酿造过openssl。

here 描述的工作流程做得更好:

$ brew remove git
$ brew remove curl

$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git

【讨论】:

    【解决方案3】:

    仅使用“brew install git --with-brewed-curl --with-brewed-openssl”安装 git 并没有帮助。

    我通过使用任何协议 https:// 或 ssh:// 设置 2 个远程 URL 得到了解决。

    1. 团队回购上游
    2. fork repo 的来源

    现在,我可以毫无问题地推动对原点的更改。

    希望对你有帮助!

    【讨论】:

      【解决方案4】:

      如果您使用的是 Virtul 机器,那么这是连接问题。 要解决此问题,您必须转到 VM 设置来桥接物理连接。

      VMware Player-->可移动设备-->网络适配器-->设置

      你会发现网络连接并检查两者

      桥接:直接连接到物理网络

      复制物理网络连接状态(如果您使用的是笔记本电脑)。

      查看以下链接了解详情:

      https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-826323AD-D014-475D-8909-DFA73B5A3A57.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-12-16
        • 2011-10-15
        • 2015-03-29
        • 1970-01-01
        • 2012-07-26
        • 2012-06-18
        • 2020-12-09
        相关资源
        最近更新 更多