当我试图从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

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


当前回答

正在更改git克隆协议尝试。

例如,当“git clone https://xxxxxxxxxxxxxxx”时发生此错误

你可以试试“git clone git://xxxxxxxxxxxxxx”,也许可以。

其他回答

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

这个问题通常发生在克隆大型回购时。如果git克隆http://github.com/large-repository——depth 1在windows cmd上不起作用。尝试在windows powershell中运行该命令。

这种错误似乎在网络连接缓慢或有问题时更常见。我已经连接了良好的网速,然后它工作得很完美。

这个问题100%解决了。我正面临这个问题,我的项目经理改变了回购的名称,但我使用旧的回购名称。

Engineer@-Engi64 /g/xampp/htdocs/hospitality
$ git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repo/cms
Cloning into 'cms'...
remote: Counting objects: 10647, done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

我是如何解决这个问题的。回购链接是无效的,所以这就是为什么我面临这个问题。克隆前请检查您的回购链接。

几天后,今天我才解决了这个问题。按照本文生成ssh密钥:

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

申报给

Git提供者(我正在使用的GitLab, GitHub)。 将此添加到本地标识。

然后通过命令克隆:

git clone username@mydomain.com:my_group/my_repository.git

没有错误发生。

上述问题

RPC失败;Curl 18传输关闭,读取数据出色 剩下的

因为通过HTTP协议克隆时出现错误(curl命令)。

并且,你应该增加缓冲区大小:

git config --global http.postBuffer 524288000