Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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).

command: $ repo sync -j10

error: 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?

thanks dolbi, i think it's the same as using make -j 4 but N in make command indicates the number of cores Ahmad Kayyali Apr 29, 2014 at 11:59 in make N is still the number of tasks, Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32. SpyZip Dec 10, 2014 at 8:17 warning: -f/--force-broken is now the default behavior, and the options are deprecated --force-sync still works. rickfoosusa Aug 24, 2022 at 19:25

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.

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!

I had some unwanted changes in multiple repositories and previously run repo rebase which only made the situation worse. repo sync -f was not able to complete because at least one repo had rebase in progress and other repo had wrong tracking information (corrupted manifest?) + some pushed but not merged commits. Force flag turned out to be useless in such situation. I just wanted the damn thing to replace my working tree with origin/master. rm -rf <affected subrepos> && repo sync did the job cleanly. Repo sync fails too often, but rm never. Xeverous Jul 22, 2019 at 15:52 There is already an answer which suggests force-sync. Consider upvoting the answer or commenting on the answer instead of posting a new answer. vijayst Sep 4, 2016 at 8:04

I have encountered this problem. I tried many times, but it did not work. Even that, I add the -f parameter some times.

Finally, I deleted the .repo/projects/xxx project , repo sync again, and it worked.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .