【发布时间】:2015-09-23 19:50:17
【问题描述】:
我最近刚刚注意到,当我克隆一个新的 repo(无论大小)时,git clone 似乎挂起。我试过在详细模式下运行,但我什么也没看到。
如果我等待的时间足够长,它最终会克隆,但它比以前慢了很多。
所有其他 git 命令都可以正常工作。我可以推、拉、取等没问题。我只在克隆时注意到速度很慢。
我的下载速度还不错(下降了 80 mbps),而且我知道它不是特定于 repo,因为我可以在 github 上创建一个新的小型 repo 并尝试克隆它,这需要 10 多分钟。
我唯一能想到的是它是否与 SSH 有关。我最近确实添加了一个新的 SSH 密钥。我没有遇到过身份验证问题(据我所知)。我通常使用 ssh 来克隆,我刚刚尝试过 HTTPS,我也遇到了同样的慢。
这是我在上次成功克隆时看到的:
Cloning into 'repo-name'...
error: ignoring template /Users/username/Library/Group Containers/gdrive/tmp0F0X6n
error: ignoring template /Users/username/Library/Group Containers/gdrive/tmplj3WUJ
error: ignoring template /Users/username/Library/Group Containers/gdrive/tmpPGME7Z
error: ignoring template /Users/username/Library/Group Containers/gdrive/tmpSbnzav
error: ignoring template /Users/username/Library/Group Containers/gdrive/tmpTer2Uf
remote: Counting objects: 172, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 172 (delta 17), reused 14 (delta 14), pack-reused 153
Receiving objects: 100% (172/172), 18.86 KiB | 0 bytes/s, done.
Resolving deltas: 100% (88/88), done.
Checking connectivity... done.
【问题讨论】:
-
您是否正在将存储库克隆到谷歌驱动器?这可能是放缓的主要来源。 (尝试克隆到其他地方,然后将 repo 移动到谷歌驱动器。)
-
我不明白该错误消息,因为我没有克隆到 Google Drive。我要克隆到的目录未以任何方式连接到我的 Google 云端硬盘。
-
你能包含一个详细的克隆吗?
-
那是一个冗长的克隆...但是现在我正在运行 npm install --verbose 并且我看到它挂在克隆步骤
npm info git [ 'clone', npm info git '/Users/username/.npm/_git-remotes/ssh-git-github.com-repo-name-45c04fe3', npm info git '/var/folders/8v/s8mldnz571qb7v0w09__vv540000gq/T/npm-50934-1960caf5/git-cache-72fd485d77be/9a4c96e9a5ecae40486cab3542168740e9657535' ] -
我曾经有一个缓慢的克隆,我退出了 Skype,它立即工作。