fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connect to gerrit.googlesource.com port 443: Connection timed out
and because of these errors repo sync stops with error: Exited sync due to fetch errors
and because of that I used repo sync -f
(--force broken flag) which is supposed to fix network errors (Not sure). My repo is still syncing (along with the errors) and I don't know whether I'll get proper synced files at the end or not. Can someone tell me what are these errors? why do they occur and how to fix them ? I can see some of them are network related but I not sure how many. Please help me fix these.
I have searched a few questions on SE but those errors had different backgrounds and were not related to repo
(although obviously related to git).
My network speed : MAX 1MBps (which why it's confusing me more about those network issues that shouldn't happen generally)
I have come to a realization that a high speed connection is not enough, it has to be highly stable and consistent with its speed.
This change of network fixed most of the issues except the GnuTLS ones. Looked like gnutls
demanded a corporate grade internet connection from me (which I couldn't afford) as it's highly sensitive to network fluctuations.
The git config --global http.postBuffer 1048576000
method didn't work.
I rebuilt git
with openssl
(guide) which reduced the fluctuation sensitivity to a great deal (when compared to gnutls
).
After that the remaining errors where fixed by running repo sync -f
again and again. It's not much of a solution but the lesson is that openssl
works better with unstable and low bandwidth (that's if you call 1-2MBps a low bandwidth connection) connections.
I ran the following commands to tweak the TCP settings and use non-parallel commands. After that, I downloaded all the source code successfully:
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -j1
Source: https://source.android.com/setup/build/downloading#troubleshooting-network-issues
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.