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

这里的问题是什么?

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

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

当前回答

我也有同样的问题, 我用试错法解决了这个问题。我改变了core。compression值直到它生效。

在3次尝试后,我从“git配置-global core.compression 1”开始

“git config—global core.compression 4”对我很有用。

其他回答

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

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

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

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

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

这是由于网络连接问题,我也遇到过同样的问题。 我做了一个浅层的代码副本使用

git clone --depth 1 //FORKLOCATION

稍后取消浅化克隆使用

git fetch --unshallow

检查网速。同时检查以下命令:

$ git config --global http.postBuffer 2M
$ git pull origin master

增加postBuffer大小和maxRequestBuffer将有助于解决这个问题。按照步骤做就可以了。

步骤:

1 .打开终端或Git Bash,用“cd”转到你想克隆repo的位置。

2.将压缩设置为0

git config --global core.compression 0

3.设置postBuffer大小

git config --global http.postBuffer 1048576000

4.设置maxRequestBuffer大小

git config --global http.maxRequestBuffer 100M

5.现在开始克隆

git clone <repo url>

6.等待克隆完成。

谢谢你!快乐编码!!