SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

GitNpmOpensslHomebrew

Git Problem Overview


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.

Git Solutions


Solution 1 - Git

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.

Solution 2 - Git

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.

Solution 3 - Git

I just turned off VPN and it solved the issue.

Solution 4 - Git

Since you're using LibreSSL, try re-installing curl with OpenSSL instead of Secure Transport.


Latest Brew

All options have been removed from the curl formula, so now you need to install via:

brew install curl-openssl
Older Brew

Install curl with --with-openssl:

brew reinstall curl --with-openssl

Note: If above won't work, check brew options curl to display install options specific to formula.


Here are few other suggestions:

  • Make sure you're not using http_proxy/https_proxy.
  • Use -v to curl for more verbose output.
  • Try using BSD curl at /usr/bin/curl, run which -a curl to list them all.
  • Make sure you haven't accidentally blocked curl in your firewall (such as Little Snitch).
  • Alternatively use wget.

Solution 5 - Git

From https://github.com/Homebrew/brew/issues/4436#issuecomment-403194892

Issue solved by setting this env variable:

export HOMEBREW_FORCE_BREWED_CURL=1

Solution 6 - Git

A simple restart fixed it for me. I'm not sure what was the problem since I work with so much software but I have a feeling it was the VPN software or maybe the fact I put my laptop in sleep a lot and some file was corrupted. I really don't know but the restart fixed it.

Solution 7 - Git

  1. Tried creating a new branch and pushing. Worked for a couple of times but faced the same error again.

2)Just ran these two statements before pushing the code. All I did was to cancel the proxy.

$ git config --global --unset http.proxy
$ git config --global --unset https.proxy
  1. Faced the issue again after couple of weeks. I have updated homebrew and it got fixed

Solution 8 - Git

I have a similar issue and I just found that in my case it may be the antivirus that creates an issue.

At some moment I've got the same error while trying to pull some data from github.com.

I knew that Kaspersky is intercepting the SSL connections to check for malicious content from the sites and I decided to disable it, but I found that KAV is hung and not really responding, so I just closed Kaspersky and tried to connect to github.com again and alas! I was able to connect successfully to GitHub.

So in you case it may be a similar issue.

Solution 9 - Git

I use ClashX 1.30.2 and I can visit the google.com in Google Chrome.

After I encountered this issue, I click the 'Copy shell command'

Clash screenshot

And I execute the command line copied by the above.

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890

And it fixed the issue.


Before I encounted the issue.
➜  octopus brew services start jenkins-lts
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-services/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-services /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services --origin=origin` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/services` exited with 1.

After setting the proxy, I fixed the issue.

➜  octopus export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
➜  octopus brew services start jenkins-lts
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 1174, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 1174 (delta 19), reused 13 (delta 9), pack-reused 1121
Receiving objects: 100% (1174/1174), 342.45 KiB | 2.22 MiB/s, done.
Resolving deltas: 100% (496/496), done.
Tapped 1 command (41 files, 432.8KB).
==> Successfully started `jenkins-lts` (label: homebrew.mxcl.jenkins-lts)

Solution 10 - Git

If none of the other solutions can fix your problem try edit .gitconfig file directly. In my case, I use VPN proxy for HTTP, HTTPS, SOCKs. My local proxy endpoint is 127.0.0.1:4780

.gitconfig file

[user]
    name = xxx
    email = [email protected]
[remote "origin"]
    proxy = http://127.0.0.1:4780
[http]
    proxy = http://127.0.0.1:4780
[https]
    proxy = http://127.0.0.1:4780

Be sure to fill out the [remote "origin"] section with the proxy endpoint.

Solution 11 - Git

same issue with KAV. Restart it solved the pb.

Solution 12 - Git

I would suggest updating git. If you downloaded the .pkg then be sure to uninstall it first.

Solution 13 - Git

I experienced this while trying to clone from an enterprise repository, and simply restarting the terminal solved it for me.

Solution 14 - Git

The problem for me seems to have been how the user has been setup on my local machine to. Using the command
git push -u origin master
was causing the error. Removing the switch -u to have
git push origin master
solved it for me. It can be scary to imagine how user setup can result in an error related to LibreSSL.

Solution 15 - Git

for me, that's caused by the SSL certificate not enabled in the K8S ingress. hope this helps someone

Solution 16 - Git

I also met this problem while I was using git with proxy and from my experiences there are two ways to remove this problem. I would recommend the second way.

  1. git config --global sslVerify false (equivalent with editing the ~/.gitconfig as below)

> [http] > proxy = http://127.0.0.1:1234 > sslVerify = false

OR

  1. replace http proxy with socks5 proxy

> [http] > proxy = socks5h://127.0.0.1:4567

NB The "h" in socks5h:// means to use remote DNS on proxy side rather than your local one, this usually expedites the communication a lot than using plain socks5:// if your local DNS is messy.

Solution 17 - Git

Hi everyone I found the solution regarding this github issue and it works for me no longer able to use private ssh key

Try following theses steps:

1 - Use HTTPS if possible. That will avoid SSH keys entirely.
2 - Manually add the SSH key to the running SSH agent. See manually generate ssh key
3 - If the two others doesn't work, delete all your ssh keys and generate some new one thats what I did after weeks of issues.

Hope it will help you..

Solution 18 - Git

If anyone gets this issue while using the integrated terminal in Visual Studio Code then there is a good chance it's updating. Restart Visual Studio Code and you will likely see the "New Version" tab and it should all start working again.

Solution 19 - Git

I have met the same problem. Here is how I did

First, remove any local files related to homebrew, you might have a broken installation process before.

curl https://raw.githubusercontent.com/Homebrew/install/master/uninstall > uninstall_brew.rb
ruby uninstall_brew_rb

Then, export your VPN proxy in the command line if you use it.

Finally, reinstall the homebrew with

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Solution 20 - Git

For me It was for android studio , i have excluded some folders by going to Windows Settings-> Virus & threat protection settings --> Exclusions bcoz a warning was displayed regarding antivirus during gradle build. The folders were taken from this link https://developer.android.com/studio/intro/studio-config?utm_source=android-studio#antivirus-impact
After excluding those mentioned folders i tried to perform git pull , it was not happening , then i removed from excluded folders , git pull started working .

Solution 21 - Git

enter image description here

i used mac 10.14.6 .add github.com in wifi proxy setting

Solution 22 - Git

1.open : https://www.ipaddress.com/ 2.input and get the ip : raw.githubusercontent.com 3.vi etc/hosts 4.then copy the ip like this to the hosts file: e.g: 199.232.68.133 raw.Githubusercontent.com 5.git clone again.

Solution 23 - Git

You should create a personal access token to use in place of a password with the command line or with the API.

I got the same error. And terminal says:

> Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

So, this worked for me.

Solution 24 - Git

In my case, I got the message due to token expired and after generating new token. I did as follows to update:

git remote set-url origin https://gitusername:[email protected]/gitusername/repository.git

Solution 25 - Git

brew install curl-openssl is deprecated. Hence it will not work. So the solution is simply to run this command in your terminal:

$ brew install curl

Solution 26 - Git

I got this error "OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlabee.dt.renault.com:443" while pulling the code .

Solution: Please check GitLab is available or not . Once GitLab is available try again it will work.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEmile CanteroView Question on Stackoverflow
Solution 1 - GitmljrgView Answer on Stackoverflow
Solution 2 - GitNick ZhangView Answer on Stackoverflow
Solution 3 - GitjoliejulyView Answer on Stackoverflow
Solution 4 - GitkenorbView Answer on Stackoverflow
Solution 5 - GitPhil WilsonView Answer on Stackoverflow
Solution 6 - GitRaulView Answer on Stackoverflow
Solution 7 - GitdingoView Answer on Stackoverflow
Solution 8 - GitSergey KuznetsovView Answer on Stackoverflow
Solution 9 - GitFrancis BaconView Answer on Stackoverflow
Solution 10 - GitLaiView Answer on Stackoverflow
Solution 11 - GitJulienView Answer on Stackoverflow
Solution 12 - GitAndreas GSView Answer on Stackoverflow
Solution 13 - GitMoses KiratheView Answer on Stackoverflow
Solution 14 - GitAmos KosgeiView Answer on Stackoverflow
Solution 15 - GitzzzzzsyView Answer on Stackoverflow
Solution 16 - GitgpandaView Answer on Stackoverflow
Solution 17 - GitEmile CanteroView Answer on Stackoverflow
Solution 18 - GitDaniel DouglasView Answer on Stackoverflow
Solution 19 - Gituser8688021View Answer on Stackoverflow
Solution 20 - GitAdiView Answer on Stackoverflow
Solution 21 - Gitwa liqi View Answer on Stackoverflow
Solution 22 - GitBLiYingView Answer on Stackoverflow
Solution 23 - GitTunaView Answer on Stackoverflow
Solution 24 - GitdudungView Answer on Stackoverflow
Solution 25 - Gitmd-siamView Answer on Stackoverflow
Solution 26 - GitMonalisa MondalView Answer on Stackoverflow