当前位置:   article > 正文

Git拉取项目太大超时下载不下来_git 设置了postbuffer 还是报错无法下载

git 设置了postbuffer 还是报错无法下载

问题:拉取项目的时候 报错

fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
  • 1

解决方法:
1.

git config --global http.postBuffer 524288000 配置git 缓存为500mb(1048576000)
git config core.compression 0 设置压缩机别 0表示无压缩,-1为zlib默认压缩值,而1-9是速度大小集中的方案,最慢的是9
git clone --depth 1 [链接]  // 只拉取最近的一次提交
  • 1
  • 2
  • 3

拉取完成后会发现没有远程分支
2.
打开项目.git文件夹 config文件中

[remote "origin"]
	url = http://gitlab03.tclking.com/applications/app/android/tlive_play.git
	fetch = +refs/heads/*:refs/remotes/origin/*
  • 1
  • 2
  • 3

将fetch = 后边的替换为

+refs/heads/*:refs/remotes/origin/*
  • 1

关联远程分支

或者

git fetch --unshallow
git remote set-branches origin '*'
git fetch -v
  • 1
  • 2
  • 3

3.git pull
这样就完成代码的clone了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/744939
推荐阅读
相关标签
  

闽ICP备14008679号