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

21,205

Solution 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

Solution 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

Solution 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!

Solution 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

Share:
21,205
pinkdevelops
Author by

pinkdevelops

Java, PHP, & C# Cigar and microbrew enthusiast!

Updated on July 09, 2022

Comments

  • pinkdevelops
    pinkdevelops almost 2 years

    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!

  • werediver
    werediver over 8 years
    You may also need curl with --with-openssl option (on OS X 10.11 fresh install).
  • Gordon Dickens
    Gordon Dickens about 8 years
    I needed to uninstall and reinstall BOTH git and curl with the options above. Thanks!