我尝试使用
git push origin master
将一些更改推送到 GitHub,但一段时间后它显示错误:
fatal: unable to access 'https://github.com/the-unbelievable/MiniGames.git/': Failed to connect to github.com port 443: 操作超时
我刚刚创建了那个存储库并且已经提交了两次。我通过家庭 Wi-Fi 连接到互联网,操作系统是 Mac OS X v10.10.2 (Yosemite)。
如果您在代理后面,请检查
C:\Users\[your username]\.gitconfig
的内容并确保配置了代理:
[http]
proxy = http://yourproxy.com:8080 // Change your settings here
[https]
proxy = http://yourproxy.com:8080 // Change your settings here
原因是持续的DDoS攻击... https://status.github.com/messages
从这里: GitHub - 无法连接到 github 443 窗口/无法连接到 gitHub - 没有错误
git config --global http.proxy http[s]://userName:password@proxyaddress:port
端口可能是 3128,用户名:密码可能是您的 Windows 登录凭据
尝试使用以下方式配置环境:
sudo vim.tiny /etc/environment
在那里添加:
http_proxy=http://your.proxy.server.address:port
https_proxy=http://your.proxy.server.address:port
ftp_proxy=http://your.proxy.server.address:port
还在 gitconfig 文件中添加代理设置。