在Mac上
使用SourceTree
从码云拉取公司的quick-cocos
项目,爆出以下错误:
git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone https://gitee.com/hnkw/got.git /Users/jerrywong/project/got-lua
Cloning into '/Users/jerrywong/project/got-lua'...
warning: templates not found /usr/local/git/share/git-core/templates
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
Completed with errors, see above
问题warning: templates not found /usr/local/git/share/git-core/templates
解决方法
看到冒号前的warning
可以知道,这是个警告错误,不影响正常使用,此问题不管他也是可以的。如果真想干掉它,可以打开终端,执行以下命令即可:
sudo mkdir -p /usr/local/git/share/git-core/templates
sudo chmod -R 755 /usr/local/git/share/git-core/templates
问题
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
解决方法
执行以下命令,将传输大小限制设大即可(这里设为500M)
git config --global http.postBuffer 524288000
参考文章:
1、使用sourcetree快速拉取github的代码
2、Git 报错:git - error: RPC failed; curl 18 transfer closed with outstanding read data remaining 解决方案