原文链接:http://blog.csdn.net/mc_hust/article/details/33304733
我自己出现了第五个问题,这个解决办法看似比较靠谱:
5.另外还有一个很少出现的错误。同样是在repo sync时,如果出现如下错误:
- remote: Sending approximately 1.11 GiB ...
- remote: Counting objects: 42, done
- remote: Finding sources: 100% (42/42)
- remote: Sending approximately 200.67 MiB ...
- remote: Counting objects: 18, done
- remote: Finding sources: 100% (18/18)
- error: RPC failed; result=56, HTTP code = 2000 KiB/s
- fatal: The remote end hung up unexpectedly
- fatal: 过早的文件结束符(EOF)
- fatal: index-pack failed
- error: RPC failed; result=56, HTTP code = 200
- fatal: The remote end hung up unexpectedly
- fatal: early EOF
- fatal: unpack-objects failed
- error: RPC failed; result=56, HTTP code = 200
- fatal: The remote end hung up unexpectedly
- fatal: 过早的文件结束符(EOF)
- fatal: index-pack failed
- error: RPC failed; result=56, HTTP code = 200
- fatal: The remote end hung up unexpectedly
- fatal: 过早的文件结束符(EOF)
- fatal: index-pack failed
解决方法:
网络不顺通常是一时的,这里的办法除了换网之外只有反复执行 repo sync。当然这里完全不需要自己去反复执行,可以通过编写一个脚本程序,让计算机在下载崩溃后自动重新下载。在代码目录建立一个脚本(sh)文件,输入如下:
- #!/bin/bash
- echo ¨================start repo sync===============¨
- repo sync -f -j10
- while [ $? == 1 ]; do
- echo ¨================sync failed, re-sync again=============¨
- sleep 3
- repo sync -f -j10
- done
之后可以做自己的事,让程序自动下载,当你蓦然回首的时候,它已经默默下载成功了。。
谢谢~~