最近一直没解决git clone
时出现中断的问题
Cloning into '/Users/Sirormy/sdk/clang/fastcomp/src'...
remote: Counting objects: 1225089, done.
remote: Compressing objects: 100% (22/22), done.
error: RPC failed; result=18, HTTP code = 20050 MiB | 1.08 MiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
['/usr/bin/git', 'clone', 'https://github.com/kripken/em...', '/Users/Sirormy/sdk/clang/fastcomp/src'] failed with error code 128!
Installation failed!
基本靠谱的回答都看了一遍, 基本是如下几种:
有人说这样
git config --global core.compression -1
或者修改~/.gitconfig
autocrlf = input excludesfile = /Users/Sirormy/.gitignore_global packedGitLimit = 5120m packedGitWindowSize = 5120m compression = 1 [difftool "sourcetree"] cmd = opendiff \"$LOCAL\" \"$REMOTE\" path = [mergetool "sourcetree"] cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" trustExitCode = true [commit] template = /Users/Sirormy/.stCommitMsg [pack] deltaCacheSize = 5120m packSizeLimit = 5210m windowMemory = 5210m [http] postBuffer = 1048576000
还有 Stackoverflow 上得票最高的, 这样
First, turn off compression: git config --global core.compression 0 Next, let's do a partial clone to truncate the amount of info coming down: git clone --depth 1 When that works, go into the new directory and retrieve the rest of the clone: git fetch --unshallow or, alternately, git fetch --depth=2147483647 Now, do a regular pull: git pull --all
测试中型项目使用这几种方法能够解决, 但超大项目比如我clone emscripten的时候就会有问题, 大约50M左右的时候就会报上述错误.
git 重装过依然没有解决, 排除了git软件本身的问题, 目前版本是
git version 2.3.2 (Apple Git-55)
由于某些场景是代码中自动拉取的 git 资源, 所以手动下载不能解决所有问题
所以我该怎么办? 如果你有解决方法, 请测试一下然后告诉我
git clone https://github.com/kripken/emscripten.git
项目有些大, 但是如果下载超过59M还没有错误的话, 那就是答案了.
谢谢~
실행
git repack -a -f -d --window=250 --depth=250
하면 끝입니다.계속 오류가 발생하면 다음을 실행하세요.
으아아아SSH 주소로 변경할 수도 있습니다:
git clone git@github.com:kripken/emscripten.git
디버그 문서: https://coding.net/help/faq/g...