我的git客户端在尝试克隆存储库一段时间后反复失败,出现以下错误。

这里的问题是什么?

注意:我已经向GIT托管提供商注册了我的SSH密钥

Receiving objects:  13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly

当前回答

解决WIFI路由器设置:

当我在wifi设置PPPoE(通过wifi路由器自动登录)时,我也遇到了同样的问题。

Git下载速度非常慢15kb。

packet_write_wait: Connection to 17.121.133.16 port 22: Broken pipe 致命的:对端意外挂机 致命:早期EOF 致命:索引包失败

解决方案: 1. 更改设置为动态IP,重新启动wifi路由器。 2. 从web浏览器登录到Internet服务提供商门户(不配置PPPoE,从wifi路由器自动登录)。

修改后的Git下载速度为1.7MiB。

其他回答

对于共享带宽,尝试在负载较小时进行克隆。否则,请尝试高速连接。如果仍然不工作,请使用以下命令,

git config --global http.postBuffer 2048M
git config --global http.maxRequestBuffer 1024M
git config --global core.compression 9

git config --global ssh.postBuffer 2048M
git config --global ssh.maxRequestBuffer 1024M

git config --global pack.windowMemory 256m 
git config --global pack.packSizeLimit 256m

再试着克隆一次。您可能需要根据可用内存大小更改这些设置。

我有同样的错误,而使用BitBucket。我所做的是从我的回购的URL中删除https,并使用HTTP设置URL。

git remote set-url origin http://mj@bitbucket.org/mj/pt.git

上面的技巧对我没有帮助,因为repo比github允许的最大推送大小还要大。有效的方法是来自https://github.com/git-lfs/git-lfs/issues/3758的建议,建议每次推一点:

If your branch has a long history, you can try pushing a smaller number of commits at a time (say, 2000) with something like this: git rev-list --reverse master | ruby -ne 'i ||= 0; i += 1; puts $_ if i % 2000 == 0' | xargs -I{} git push origin +{}:refs/heads/master That will walk through the history of master, pushing objects 2000 at a time. (You can, of course, substitute a different branch in both places if you like.) When that's done, you should be able to push master one final time, and things should be up to date. If 2000 is too many and you hit the problem again, you can adjust the number so it's smaller.

在MacOSX High Sierra游戏中,我的解决方案是:

brew install git-lfs

我的存储库被克隆了,没有任何错误。

使用以下命令后,我得到了解决方案:

Git重新打包-a -f -d——window=250——depth=250