2021年9月8日

git clone 遇到问题:Failed to connect to github.com port 443: Operation timed out

问题描述

有一些 git 仓库,总是 clone 不了。报错:Failed to connect to github.com port 443: Operation timed out

执行命令 git config –global –unset https.proxy 后,仍然报错,内容变成:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

解决方案

Step1 设置代理

(一定要先设置代理)

git config --global http.proxy 'http://localhost:1080'

此时,执行 git clone,会有报错:Failed to connect to localhost port 1080: Connection refused

Step2 取消代理

git config --global --unset http.proxy

再次执行 git clone,就正常了。


“以书为舟,遨游尘世”,
最好的免费 kindle 电子书分享站:

You may also like...

发表回复

您的电子邮箱地址不会被公开。


*