git clone大文件EOF错误

git clone大文件EOF错误

我们常用的git clone https://XXX 下载大文件时,加上墙的问题。会出现中断,例如gitlab

 

git clone https://gitlab.com/xhang/gitlab.git

正克隆到 'gitlab'...

remote: Counting objects: 451995, done.

remote: Compressing objects: 100% (96627/96627), done.

fatal: The remote end hung up unexpectedlyB | 34.00 KiB/s

fatal: 过早的文件结束符(EOF)

fatal: index-pack failed

 

 

解决一:采用ssh方式

git clone git@gitlab.com:xhang/gitlab.git

 

解决二:加大https缓存(推荐)

git init
git config http.postBuffer 524288000

 

 

 

posted on 2019-06-20 09:35  光阴8023  阅读(8218)  评论(0编辑  收藏  举报