无法推 - 无法连接到github.com 443端口:连接被拒绝
问题描述:
而试图拉或我的回购推无法推 - 无法连接到github.com 443端口:连接被拒绝
fatal: unable to access 'https://github.com/******/*****.git/':
Failed to connect to github.com port 443: Connection refused.
的问题是我收到此错误
- 我没有使用任何代理
- 它工作过一段时间,但通常它显示了这个错误
我使用Ubuntu 16。 04 LTS作为操作系统。
答
我已经看到了这个错误,不时:npm issue 10037提议(基于GitHub IP addresses):
我把我在github.com
/etc/hosts
:
192.30.252.129 github.com
192.30.252.131 github.com
204.13.251.16 github.com
如果实在不行,检查一个ssh url是否可以正常工作(provided you generate ssh keys,并且注册一个到你的GitHub帐户)
git remote set-url origin [email protected]:user:repo.git
答
我不知道它是否是正确的方式,但我通过在我的/ etc/hosts文件中保留以下IP地址来解决我的问题。
/etc/hosts中
199.27.74.133 raw.github.com
199.27.78.133 raw.github.com
204.13.250.4 生.github.com
192.30.252.143 gist.github.com
4.36.66.178 gist.github.com
199.27.74.133 developer.github.com
这似乎是同样的想法,一个我在我的答案呈现。 – VonC
是的想法是相同的,但它不适用于推。 –