连接到 github.com 的 SSL_connect: SSL_ERROR_SYSCALL: 443

几天前,我在 Mac OS High Sierra 10.13.3上遇到了一个问题: 当我运行像 git clone github.com/xxx.git failed这样的 git clone 它打印:

连接到 github.com 的 LibreSSL SSL _ connect: SSL _ ERROR _ SYSCALL: 443

npm i命令也有同样的问题 即使我尝试这样安装 brew:

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

我也试了 另一种设置: 相同的。

274022 次浏览

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

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.

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.

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..

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.

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.

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

Issue solved by setting this env variable:

export HOMEBREW_FORCE_BREWED_CURL=1

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.

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.

same issue with KAV. Restart it solved the pb.

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

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

3) Faced the issue again after couple of weeks. I have updated homebrew and it got fixed

I just turned off VPN and it solved the issue.

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

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.

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.

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)

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 = xxx@xxx.com
[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.

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)"

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 .

enter image description here

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

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.

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.

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.

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:token@github.com/gitusername/repository.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

The following should do the trick:

brew update-reset

The command will essentially fetch and reset Homebrew as well as all tap repositories. You can find more about what this command does in the actual script.