git - git clone 使用 GitBash 挂在“克隆到...”上
问题描述
我正在尝试使用 GitBash 从我组织的 GitHub 克隆存储库,但是当我执行 a 时git clone
,它会无限期挂起。输出如下:
git clone https://github.com/myorganization/myrepository
Cloning into 'myrepository'...
我查看了其他 stackoverflow 页面。git clone 在 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]
为随机的东西来触发回购的登录。(从来没有登录过。) - 我已经按照本指南重新安装了 GitBash 。
- 我也尝试过(取消)设置 http/https 代理
git config --global --unset http.proxy
和git config --global --unset https.proxy
如果有人可以帮助我解决这个问题,我将不胜感激。谢谢。
解决方案
这对我有帮助:https ://github.com/microsoft/Git-Credential-Manager-Core/issues/364
基本上,我只需要输入这个命令git config --global credential.provider generic
然后克隆。
希望它也适用于你。
推荐阅读
- automapper - 迁移到 Automapper 10 后,使用 Automapper 的表达式映射会引发 System.EntryPointNotFoundException
- isabelle - 可以在 Isabelle 中追踪分辨率证明吗?
- scala - 轻松创建案例类替代构造函数的所有组合
- javascript - Bootstrap Modal 和 Jquery:[DOM] 找到 2 个具有非唯一 ID 的元素,但是所有 ID 都是唯一的
- python - 将一维 numpy 数组拆分为相同的数组集并返回集数
- regex - Ruby 中的条件正则表达式
- javascript - React-Native:如何在屏幕上呈现存储在 POST 请求中的变量?
- python - 如何使用外键将 CSV 文件导入 django
- flutter - Flutter IgnorePointer for 2 个手指
- ruby-on-rails - 如何将字段添加到 Rails 模型?