【问题标题】:Git communication with github incredibly slowGit 与 github 的通信非常慢
【发布时间】:2019-02-06 14:05:18
【问题描述】:

我最近在我的 Windows 10 PC 上安装了 git。一切正常,但是当我推或拉任何东西时,可能需要几分钟才能完成。改变无线网络似乎并没有改变任何东西,这个问题在私人和公共回购中都存在,而且以前从未经历过这么长时间。此外,我尝试卸载并重新安装 Git。为了排除故障,我跑了:
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull origin master

看到它挂在这里并花了很多时间:

* Couldn't find host github.com in the _netrc file; using defaults
*   Trying 192.30.253.113...
* TCP_NODELAY set

* After 149984ms connect time, move on!
* connect to 192.30.253.113 port 443 failed: Timed out
*   Trying 192.30.253.112...
* TCP_NODELAY set
* Connected to github.com (192.30.253.112) port 443 (#0)

我尝试的每次 git pull 或 git push 都会出现此超时,并且不知道如何进一步排除故障。

【问题讨论】:

    标签: git github


    【解决方案1】:

    首先,检查在 using SSH 而不是 HTTPS URL 时问题是否仍然存在。

    其次,通过使用simplified PATH 和便携式Git(如PortableGit-2.20.1-64-bit.7z.exe)在任何你想要的地方解压缩,检查其他程序是否可能干扰。

    set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    set GH=C:\path\to\git
    set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
    

    【讨论】:

      猜你喜欢
      • 2011-03-26
      • 2022-10-25
      • 2020-08-16
      • 2017-08-19
      • 1970-01-01
      • 2017-05-09
      • 2018-11-14
      • 1970-01-01
      • 2016-02-28
      相关资源
      最近更新 更多