今天在电脑上git clone 远程仓库,出现如下错误:

git clone http://IP:端口/axxxx/axxxxre-dxxxxx-repository.git
Cloning into 'xxxxx'...
remote: Enumerating objects: 2190, 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

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

google后,发现原因是远程仓库过大。

解决方法如下:

git clone http://github.com/large-repository --depth 1
cd large-repository
git fetch --unshallow

先做一层浅拷贝,再做深拷贝,即可解决。

source:StackOverflow

最后修改:2021 年 06 月 03 日 11 : 17 PM
如果觉得我的文章对你有用,请随意赞赏