git push 到remote的时候,出错,提示:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
在网上搜到了一些不同的建议,方法和效果 整理在此。
1. 说git的代理问题, 需要运行以下两句:
git config --global --unset http.proxy 或
git config --global --unset https.proxy
效果:
执行后还是push失败, 报错信息变成了: Failed to connect to github.com port 443: Operation timed out
也有的说 运行命令后要web访问之后就可以了。 这个我没有试过。
2. 也可能是github的ip的问题
通过https://www.ipaddress.com/查询https://github.com/ 和github.global.ssl.fastly.net的IP地址。
vim /etc/hosts 编辑hosts文件, 更新上面查到的IP地址。
效果:
发现查询结果与之前的hosts的IP地址发生变化, 更新后 push成功。
3. 有的说git push http会这样,ssh就不会,需要创建ssh key。具体方法待补。