我的git客户端在尝试克隆存储库一段时间后反复失败,出现以下错误。
这里的问题是什么?
注意:我已经向GIT托管提供商注册了我的SSH密钥
Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly
我的git客户端在尝试克隆存储库一段时间后反复失败,出现以下错误。
这里的问题是什么?
注意:我已经向GIT托管提供商注册了我的SSH密钥
Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly
当前回答
增加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 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块中推送更改。现在我已经推送了所有更改。这是我的工作,直到我得到这个解决方案。
因此,您也可以尝试在多次提交中推动更改。或者如果你有多个文件夹,你可以按每个文件夹推送更改(如果文件夹大小不大)。
希望这将有助于你继续工作的项目。
唯一对我有用的是:
克隆浅: Git克隆<yourrepo>—深度10 编辑。git/config如下:
之前
[remote "origin"]
fetch = +refs/heads/master:refs/remotes/origin/master
后
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
Git配置——global http。maxRequestBuffer 100 Git配置——global core.compression 0 Git获取
我也遇到过类似的问题,不过是竹子做的活。竹是失败的做本地克隆(本地但通过SSH代理)缓存的存储库,我删除了缓存,之后它工作了,但任何时候它试图从本地缓存克隆有一个失败。似乎是bamboo的SSH代理版本的问题,而不是git本身。
我也有同样的问题。这个问题的原因正如Kurtis对GNUTLS的描述。
如果你有同样的原因,并且你的系统是Ubuntu,你可以通过从ppa安装最新版本的git来解决这个问题:git-core/ppa。命令如下所示。
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get git