问题描述
几天后,我遇到了 Mac OS High Sierra 10.13.3 的问题:当我运行 git clone
之类的 git clone github.com/xxx.git failed
它打印:
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 连接到 github.com:443
与 npm i
命令相同的问题即使我尝试像这样安装 brew:
Same issue with npm i
commandEven when I try to install brew like so:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
我也尝试了替代设置:相同.
推荐答案
我在使用 wget ...
的时候也遇到过这个类似的错误,在网上搜索了很多无果的结果,我发现它是当主机名被解析为 IPv6 地址时发生.我通过比较两台机器中 wget ...
的输出发现了这一点,一台解析为 IPv4 并在那里工作,另一台解析为 IPv6 并在那里失败.
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.
因此,我的解决方案是在 macOS High Sierra 10.13.6 上运行 networksetup -setv6off Wi-Fi
.(我在这个页面中发现了这个命令).
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).
希望对你有帮助.
这篇关于SSL_connect: SSL_ERROR_SYSCALL 连接到 github.com:443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!