【发布时间】:2021-09-08 04:07:16
【问题描述】:
我正在尝试使用 GitBash 从我组织的 GitHub 克隆存储库,但是当我执行 git clone 时,它会无限期挂起。输出如下:
git clone https://github.com/myorganization/myrepository
Cloning into 'myrepository'...
我查看了其他 stackoverflow 页面。 git clone hangs forever on github 建议尝试使用 git clone git@github.com/myorganization/myrepository 进行锥体,但没有成功。它还建议做GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone --verbose https://github.com/myorganization/myrepository。当我这样做时,我注意到它挂在:
[...]
11:44:04.432276 http.c:721 <= Recv header, 0000000057 bytes (0x00000039)
11:44:04.432276 http.c:733 <= Recv header: x-github-request-id: CEEF:07BD:11FD966:1D089D5:60D380F4
11:44:04.432276 http.c:721 <= Recv header, 0000000023 bytes (0x00000017)
11:44:04.432276 http.c:733 <= Recv header: x-frame-options: DENY
11:44:04.432276 http.c:721 <= Recv header, 0000000002 bytes (0x00000002)
11:44:04.432276 http.c:733 <= Recv header:
11:44:04.432276 http.c:774 == Info: Connection #0 to host github.com left intact
(如果需要,我可以显示整个输出。)
我还查看了Git clone, push and pull all hang with no messages,这表明它可能是网络问题。为了诊断网络问题,我安装了 GitHub Desktop,并尝试了克隆,效果很好。因此,这不是网络问题。
我也尝试了其他一些方法:
- 我确认我可以访问我的 GitHub 存储库(我在 repo 中列为成员)
- 我已经使用
git config --global user.name[email]将我的用户名和电子邮件重置为随机的,以触发回购的登录。 (从来没有登录过。) - 我已经按照this 指南重新安装了 GitBash。
- 我也尝试过(取消)使用
git config --global --unset http.proxy和git config --global --unset https.proxy设置http/https 代理
如果有人能帮我解决这个问题,我将不胜感激。谢谢。
【问题讨论】:
-
您要克隆的存储库有多大?
-
非常小。这是一个包含两行的文本文件。
-
git-for-windows 的版本是多少?
-
2.32.0.windows.1