我的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
当前回答
我也有同样的问题,正在网上搜索解决方案。我发现我们公司的IPv6路由没有维护。
我关闭了(在Windows 10的以太网端口上的IPv6选项),没有问题。
其他回答
运行git push…从Mac终端做出的技巧,这是不同的尝试从IDE(我的情况:VSCode)导致的问题。
我也有同样的问题。这个问题的原因正如Kurtis对GNUTLS的描述。
如果你有同样的原因,并且你的系统是Ubuntu,你可以通过从ppa安装最新版本的git来解决这个问题:git-core/ppa。命令如下所示。
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get git
嗯,我想推出一个219 MB的解决方案,但我没有运气
git config --global http.postBuffer 524288000
有一个525mb的后缓冲区有什么意义呢?这是愚蠢的。所以我查看了下面的git错误:
Total 993 (delta 230), reused 0 (delta 0)
POST git-receive-pack (5173245 bytes)
error: fatal: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
git想要发布5mb,然后我将post buffer设为6mb,它可以工作
git config --global http.postBuffer 6291456
浪费了几个小时尝试这些解决方案,但最终追踪到公司IPS(仪器保护系统)在传输一定量的数据后断开了连接。
上面的技巧对我没有帮助,因为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.