Git Clone Fails with sslRead() error on OS X Yosemite

血红的双手。 提交于 2019-12-17 18:36:29

问题


I'm currently on OS X Yosemite 10.10.3, and trying to git clone an existing repo which works fine on Windows. I've tried a combo of installing git through homebrew with curl/openssl with no luck. When i run the git clone, i get the following ssl read error:

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.

I've tried using both the Https & Http with no luck. Has anyone else hit something similar to this?

Below are outputs of git, curl, & openssl versions if that helps.

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

Thanks in advance for any direction!


回答1:


Javabrett's link got me to the answer, it revolves around Yosemite using an incorrect SSL dependency, which Git ends up using.

Installing Git via homebrew with these flags works:

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

Or:

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



回答2:


if one had no brewed openssl before the answer above (brew reinstall git --with-brewed-curl --with-brewed-openssl) does not work.

The workflow described here does better:

$ brew remove git
$ brew remove curl

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



回答3:


Just installing git with "brew install git --with-brewed-curl --with-brewed-openssl" didn't help.

I got resolved by setting 2 remote URL with any protocol https:// or ssh://.

  1. upstream for team repo
  2. origin for fork repo

Now, I am able to push with my changes to origin without any problem.

Hope it helps!




回答4:


If your are using a Virtul machine, then it is a connection problem. To solve this issue, you have to go to VM settings to Bridge the physical connection.

VMware Player-->Removable Devices-->Network Adapter-->settings

You will find Network connection and check both

Bridged: Connected directly to the physical network

Replicate physical network connection state(if you are using a laptop).

Check following link for detail:

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



来源:https://stackoverflow.com/questions/30385939/git-clone-fails-with-sslread-error-on-os-x-yosemite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!