17

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!

pinkdevelops
  • 718
  • 3
  • 7
  • 16
  • 4
    [This post](http://stackoverflow.com/questions/26461966/curl-post-to-https-url-returns-sslread-error) may be useful. – javabrett May 22 '15 at 00:40
  • 2
    *`http://myURL/gitlab/project/project.git`* - Please post the exact URL you are using to connect to the server. Do so by adding it to your question by clicking *Edit* (and don't post it as a comment). Otherwise, there's not enough information to help troubleshoot it. – jww May 22 '15 at 03:42
  • Thanks for the input, unfortunately i cannot post the exact URL its a private repo :(. However, it is a gitlab instance with a standard repo nothing special. I was able to clone from this repo on Windows and other OS's, for some reason just not Yosemite. – pinkdevelops May 22 '15 at 10:59
  • JavaBrett - Your link got me close to the answer, thank you! – pinkdevelops May 25 '15 at 15:10

4 Answers4

23

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
jrumbinas
  • 426
  • 3
  • 19
pinkdevelops
  • 718
  • 3
  • 7
  • 16
7

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
lmen6e
  • 221
  • 4
  • 8
2

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!

2

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

Loyal Fine
  • 115
  • 2
  • 7