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

这里的问题是什么?

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

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

当前回答

我必须删除git clone命令的分支标志。

其他回答

I was doing git push from my OS X El Capitan Mac. I was getting same error, I tried everything to fix, what I found on google/stackoverflow. As far as version is concerned I am using fairly latest version of github which is 2.7.4. I have create a project in my local system, and I wanted this to be public in my github account. Project size was not around 8MB. I noticed that when I was pushing some files of size around 1.5MB, it was pushing properly, but with large size failed for me, with same error,

我唯一的选择是在MB块中推送更改。现在我已经推送了所有更改。这是我的工作,直到我得到这个解决方案。

因此,您也可以尝试在多次提交中推动更改。或者如果你有多个文件夹,你可以按每个文件夹推送更改(如果文件夹大小不大)。

希望这将有助于你继续工作的项目。

当我通过ssh克隆存储库时,建议的解决方案都不适用。然而,我能够使用https克隆,然后后来将远程更改为ssh通过:

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

我在Kubuntu使用git时遇到了这个问题。我还注意到网络的整体不稳定,并找到了解决方案。

在/etc/resolv.conf 将该行添加到文件的末尾 选择单请求

这固定延迟之前,每个域名解析和git开始工作像一个魅力之后。

增加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.等待克隆完成。

谢谢你!快乐编码!!

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

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