git - 无法推送--无法连接到 github.com 端口 443 : Connection refused

标签 git github

我在尝试 pull 或推送我的存储库时遇到此错误

fatal: unable to access 'https://github.com/******/*****.git/': 
Failed to connect to github.com port 443: Connection refused.

问题是

  • 我没有使用任何代理
  • 它偶尔会工作,但通常会显示此错误

我正在使用 ubuntu 16.04 LTS 作为操作系统。

最佳答案

我时常看到这个错误:npm issue 10037建议(基于 GitHub IP addresses ):

I put my /etc/hosts in github.com:

192.30.252.129 github.com
192.30.252.131 github.com
204.13.251.16 github.com

如果没有任何效果,请检查 ssh url 是否有效(provided you generate ssh keys,并将公共(public)地址注册到您的 GitHub 帐户)

 git remote set-url origin git@github.com:user:repo.git

关于git - 无法推送--无法连接到 github.com 端口 443 : Connection refused,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41196888/

相关文章:

git - 将更改推送到远程存储库时,此 Git 警告消息是什么?

git - Go 项目中的微服务和 monolit git 存储库

python - docker python 图像中的 Git 存储库

windows - 在 Windows 存储库中使用 Linux 行结尾的 .git/config 语法是什么?

git - 在 GitHub 上将提交添加到另一个人的 pull 请求

reactjs - 在 Github Markdown 中显示 React 代码

git - 在 Git 中跟踪待办事项和问题

git - 让 git 忘记我对文件做了什么

github - 考虑将 SSH 公钥存储在 Github 存储库中吗?

github 没有与名称关联的地址