git 运行 repo 同步错误时:由于获取错误而退出同步
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16085722/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
When running repo sync error: Exited sync due to fetch errors
提问by dolbi
I'm trying to sync my jb repository but I receive this odd error. funny thing is that it does not always crash at the same point (though it might be just a synchronization issue since I add -j10).
我正在尝试同步我的 jb 存储库,但收到这个奇怪的错误。有趣的是,它并不总是在同一点崩溃(尽管自从我添加了 -j10 后,它可能只是一个同步问题)。
command:
$ repo sync -j10
命令:
$ repo sync -j10
error:
error: Exited sync due to fetch errors
错误:
error: Exited sync due to fetch errors
I'm aware of the possibility of starting fresh but this is somewhat annoying and I get this issue often enough.
我知道重新开始的可能性,但这有点烦人,而且我经常遇到这个问题。
Can anyone suggest a faster solution?
谁能建议一个更快的解决方案?
回答by dolbi
Ok, so thanks for the effort, I found a similar question here
好的,感谢您的努力,我在这里找到了类似的问题
Summary:
概括:
Invoking $ repo sync -f -j10
did the trick.
调用$ repo sync -f -j10
成功了。
As it seems -f
or --force-broken
flag allows it to recover from network error and more important recover on broken/missing objects.
看起来-f
或--force-broken
标记允许它从网络错误中恢复,更重要的是在损坏/丢失的对象上恢复。
回答by FireLord
repo sync -j1 -f --force-sync
repo sync -j1 -f --force-sync
fixed my cm13.0 sync error
修复了我的 cm13.0 同步错误
回答by Abitatha Roy
There is a major factual error which most people know! People think, if repo sync fails, they have to download from the beginning again. But this is never true! Once repo sync is restarted after an error or manual termination, it just continues to sync from where it was terminated, updating only the existing files which were updated on github. Telling you from my experience.
有一个大多数人都知道的重大事实错误!人们认为,如果 repo 同步失败,他们必须重新从头下载。但这从来都不是真的!在错误或手动终止后重新启动 repo 同步后,它只会继续从终止处同步,仅更新在 github 上更新的现有文件。以我的经验告诉你。
And one more tip: After repo sync is completed, never ever delete the .repo folder. If you do so, the repo tool will start downloading all the code from the beginning rather than just updating them when you run repo sync afterwards!
还有一个提示:在 repo 同步完成后,永远不要删除 .repo 文件夹。如果您这样做,repo 工具将从头开始下载所有代码,而不仅仅是在您之后运行 repo sync 时更新它们!
回答by ksam
Delete the projects in which u r getting the errors, then sync that project again. It worked for me.
删除出现错误的项目,然后再次同步该项目。它对我有用。
回答by Daya Sharma
I solved it by using force sync option.
我通过使用强制同步选项解决了它。
repo sync --force-sync
Please try the same..... If still getting errors, then try system force i.e.
请尝试相同..... 如果仍然出现错误,则尝试系统强制即
repo sync --force-sync system/core
回答by glen chang
i have Encounter this problems,try many times,but it doesn't work. Even that,I add the -f parameter some times.
我遇到过这个问题,试了很多次,还是不行。即便如此,我有时会添加 -f 参数。
Finally, i delete the .repo/projects/xxx project , repo sync again ,it works!
最后,我删除了 .repo/projects/xxx 项目,再次进行 repo 同步,成功了!
回答by Tom Taylor
Removing,
删除,
rm -rf .git/rebase-apply
rm -rf .git/refs
worked for me.
对我来说有效。