我尝试使用git push origin master
将一些更改推送到github,但过了一段时间它显示错误
fatal: unable to access 'https://github.com/the-unbelievable/MiniGames.git/': Failed to connect to github.com port 443: Operation timed out
我刚刚创建了那个回购并且已经提交了两次。我通过Mac OS X Yosemite 10.10.2中的家庭WiFi和操作系统连接到Internet。
原因是持续的DDoS攻击...... https://status.github.com/messages
你是代理人吗?检查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
从这里:GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error
git config --global http.proxy http[s]://userName:password@proxyaddress:port
端口可能是3128,userName:password可能是您的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文件中添加代理设置。