Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

Since a few days I got an issue with Mac OS High Sierra 10.13.3 : When I run a git clone like git clone github.com/xxx.git failed it print:

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

Same issue with npm i command Even when I try to install brew like so:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

I also tried the alternative setup: same.

like image 396
Emile Cantero Avatar asked Feb 26 '18 11:02

Emile Cantero


2 Answers

I had this similar error when using wget ..., and after much unfruitful searching in the Internet, I discovered that it was happening when hostnames were being resolved to IPv6 addresses. I discovered this by comparing the outputs of wget ... in two machines, one was resolving to IPv4 and it worked there, the other was resolving to IPv6 and it failed there.

So the solution in my case was to run networksetup -setv6off Wi-Fi on macOS High Sierra 10.13.6. (I discovered this command in this page).

Hope this helps you.

like image 54
mljrg Avatar answered Oct 03 '22 08:10

mljrg


Same problem here, it turned out to be my incorrectly configured proxy settings, here's how to check and remove them.

First open your git config file.

vi ~/.gitconfig 

and find out whether the [http] or [https] sections are set.

I used to set proxies for git due to slow access to Github in China, however, lately I changed my local proxy ports but I forgot my git settings.

If you have incorrect proxy settings and decide to remove it, simply execute:

git config --global --unset http.proxy git config --global --unset https.proxy 

Things will work just fine.

like image 21
Nick Zhang Avatar answered Oct 03 '22 08:10

Nick Zhang