无法连接到github.com端口443:操作超时
问题描述:
git clone https://github.com/RubyLouvre/avalon
Cloning into 'avalon'...
fatal: unable to access 'https://github.com/RubyLouvre/avalon/': Failed to connect to github.com port 443: Operation timed out
我不能使用https克隆任何存储库,但可以通过SSH克隆它们.
I can not use https to clone any repo,but I can clone them by SSH.
git clone git@github.com:RubyLouvre/avalon.git
Cloning into 'avalon'...
remote: Counting objects: 33102, done.
remote: Compressing objects: 100% (44/44), done.
这是什么问题?即使我设置了代理服务器,但仍然无法正常工作.我尝试了很多网络环境,但这没有任何意义.
What is the problem with this?Even I set proxy,but it is still not working.I try much of Network environment,but it make no sense.
答
如果您使用代理进行网络连接,则必须将代理添加到git配置文件中.使用以下命令添加代理.
If you are using proxy for network connection, then you will have to add proxy to git config file. Use the below command to add proxy.
git config --global http.proxy http[s]://username:password@proxyipaddress:portnumber