Git 连接问题。 “致命:无法连接到 github.com.....”

问题描述 投票:0回答:0

长期以来我的 git 一直有问题,我已经尽我所能,但它没有改变任何东西。 我的 git 在本地运行良好,它与 init、commits 等一起工作。 问题是当我去用github做任何事情时,因为做了一个

git clone
,或者
git push
它不适用于 github CLI、Git Bash 或 cmd。 我输入的任何这些命令都会产生以下错误:

fatal: unable to connect to github.com
github.com[0: 140.82.114.4]: errno=Unknown error

failed to run git: exit status 128

我一直在尝试一些互联网解决方案的观点:

  • 这个 26 upvoted answer
  • 所有这些解决方案关于获得免费 9418,尝试使用 Https 协议,在 ssh 和 https 之间切换
  • 我在
    host
    位置修改了
    C:\Windows\System32\drivers\etc
    文件,用于本地 DNS 可能不正确的配置
  • 我重新安装了 Git
  • 我搜索了一些网络问题,我从
    ping
    服务器得到了
    github.com
    和用于查看 github 请求跟踪的
    tracert github.com
    命令,它也很好用。
  • 我尝试使用以下
    culr
    命令从 cmd 下载主分支 zip 文件,它成功了!!!:
curl https://github.com/user/repo.git | git clone url:-

(当然,替换我的用户和回购名称)

  • 我将 git 自己的代理设置配置为
    unset
    :
git config --global --unset http.proxy
  • 我对连接进行了 github 测试,针对所有服务器 ip 和所有其他测试事物获得了良好的结果。

我认为问题是与端口或网络相关的git配置,但我没有找到它

windows git github networking repository
© www.soinside.com 2019 - 2024. All rights reserved.