git GitHub - HTTPS 访问
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3512202/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GitHub - HTTPS access
提问by VonC
I am unable to clone my repository via HTTPS:
我无法通过 HTTPS 克隆我的存储库:
$ git clone https://github.com/walterjwhite/project.configuration.git
Initialized empty Git repository in ./project.configuration/.git/
error: Failed connect to github.com:443; Connection refused while accessing https://github.com/walterjwhite/project.configuration.git/info/refs
fatal: HTTP request failed
I have configured .netrc with my login and password as well as the machine or server I am connecting to.
我已经用我的登录名和密码以及我连接的机器或服务器配置了 .netrc。
回答by VonC
As you did saw yourself in GitHub support, Scott Schaconhimself suggested:
正如您在GitHub 支持 中看到的那样,Scott Schacon本人建议:
So I guess your
.netrc
is incorrect or something?
Try removing the info from your.netrc
and cloning first (since it's a public repo).
所以我猜你
.netrc
是不正确的还是什么?
首先尝试从您的.netrc
和克隆中删除信息(因为它是公共存储库)。
If it isn't a GitHub server issue, it could be your firewall.
And/or your proxy (git config --global http.proxy http://user:password@proxy:xxx
).
如果这不是 GitHub 服务器问题,则可能是您的防火墙。
和/或您的代理 ( git config --global http.proxy http://user:password@proxy:xxx
)。
回答by khoomeister
Just to add to this discussion, for some reason or another, it seems to work for me when I use http rather than https.
只是为了添加到这个讨论中,出于某种原因,当我使用 http 而不是 https 时,它似乎对我有用。
回答by Gourav Roy
Just to add you might also check if GitHub's system is healthy at GitHub System Status.
只是补充一下,您还可以在GitHub System Status 中检查 GitHub 的系统是否健康。
回答by Sinc
Another possibility that worked without trouble for me was to use the SSH option for clone.
另一种对我来说没有问题的可能性是使用 SSH 选项进行克隆。
git clone [email protected]:walterjwhite/project.configuration.git
git clone [email protected]:walterjwhite/project.configuration.git
You have to upload an SSH key to Github to use this, but it got me around the https problem.
您必须将 SSH 密钥上传到 Github 才能使用它,但它让我解决了 https 问题。