GitHub - HTTPS访问

39 git https github

我无法通过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
Run Code Online (Sandbox Code Playgroud)

我已经使用我的登录名和密码以及我连接的机器或服务器配置了.netrc.

Von*_*onC 76

正如你在GitHub支持中看到的那样,Scott Schacon自己建议:

所以我猜你.netrc的不正确或什么?
尝试.netrc首先从您的克隆中删除信息(因为它是一个公共回购).

如果它不是GitHub服务器问题,它可能是您的防火墙.
和/或你的代理人(git config --global http.proxy http://user:password@proxy:xxx).

  • 删除全局代理变量`git config --global --unset http.proxy`.不要忘记`--global`.请注意,这不能解决403错误,它解决了'致命:无法访问'https://github.com/whatever/':连接到github.com失败:<yourproxyport>; 没错误.*(此错误消息确实是错误的:您正在连接到github.com:443,而不是在您的代理端口上)*. (6认同)

kho*_*ter 11

只是为了加入这个讨论,出于某种原因,当我使用http而不是https时,它似乎对我有用.

  • 在我的服务器上,我知道这是因为我没有安装GitHub的正确根证书.一旦我们安装了这些https工作正常. (3认同)