首页 > 解决方案 > 多个android repo同步致命错误

问题描述

repo sync用于将 Lineage OS 15.1 与

repo init -u https://github.com/LineageOS/android.git -b lineage-15.1

对于不同的存储库,我反复收到很多以下错误

1:

curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.

2:

Cannot fetch LineageOS/android_external_lineage-sdk-api-coverage
warn: --force-broken, continuing to sync

3:

fatal: unable to access 'https://github.com/LineageOS/android_external_lineage-sdk-api-coverage/': Could not resolve host: github.com

4:

fatal: unable to access 'https://android.googlesource.com/platform/system/tpm/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

5:

fatal: unable to access 'https://github.com/LineageOS/android_external_lineage-sdk-api-coverage/': gnutls_handshake() failed: Error in the pull function.

6:

fatal: unable to access 'https://android.googlesource.com/platform/external/libcap/': gnutls_handshake() failed: Error in the pull function.

7:

error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

8:

error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

9:

fatal: unable to access 'https://github.com/LineageOS/android_hardware_broadcom_libbt/': Empty reply from server

10:

fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connect to gerrit.googlesource.com port 443: Connection timed out

并且由于这些错误,repo 同步停止,error: Exited sync due to fetch errors因为我使用了repo sync -f(--force broken flag),它应该修复网络错误(不确定)。我的 repo 仍在同步(以及错误),我不知道最后是否会得到正确的同步文件。有人能告诉我这些错误是什么吗?为什么会发生以及如何解决?我可以看到其中一些与网络相关,但我不确定有多少。请帮我解决这些问题。

我搜索了一些关于 SE 的问题,但这些错误有不同的背景,并且与repo(尽管显然与 git 相关)无关。

我的网络速度:MAX 1MBps(这就是为什么我对那些通常不应该发生的网络问题感到困惑的原因)

标签: androidgitterminalrepositoryrepo

解决方案


我运行以下命令来调整 TCP 设置并使用非并行命令。之后,我成功下载了所有源代码:

sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -j1

来源:https ://source.android.com/setup/build/downloading#troubleshooting-network-issues


推荐阅读