当我试图从GitLab (GitLab 6.6.2 4ef8369)克隆一个存储库时,我遇到了这个错误:

remote: Counting objects: 66352, done.
remote: Compressing objects: 100% (10417/10417), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

然后中止克隆。我该如何避免这种情况?


当前回答

在更改为HTTP/1.1后,我在做git推送时遇到了这个错误。

解决方案:关闭我的VPN,重新运行git push。

其他回答

当我尝试从远程克隆时,反复出现同样的问题:

remote: Counting objects: 182, done.
remote: Compressing objects: 100% (149/149), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

最后这招对我有用:

git clone https://username@bitbucket.org/repositoryName.git --depth 1

这些步骤对我来说是有效的:使用git://而不是https://

我也面临着这个问题。解决它。 问题是网速很慢。请检查你的网络连接,别无其他。 我已经连接了良好的网速,然后它工作得很完美。希望对你有所帮助。

我在这里试了所有的答案。 我在试着往我的机器里添加椰荚。

我没有SSH密钥,所以谢谢@Do Nhu Vy

https://stackoverflow.com/a/38703069/2481602

最后使用

git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master

最终修复问题找到https://stackoverflow.com/a/50959034/2481602

试试这个

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

这是我的工作。 capture.png