gpt4 book ai didi

android - Git repo 同步 - 连接丢失

转载 作者:行者123 更新时间:2023-11-29 01:25:20 27 4
gpt4 key购买 nike

我正在尝试下载 android 源代码 (Cyanogenmod)。我已经花了超过 12 小时来下载 2.5GB 的文件,现在我的连接丢失了一段时间,它显示

 error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
fatal: unable to access 'https://github.com/CyanogenMod/android_packages_inputmethods_LatinIME/': Could not resolve host: github.com
fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
error: Cannot fetch CyanogenMod/android_packages_inputmethods_LatinIME
error: Cannot fetch platform/prebuilts/misc
error: Exited sync due to fetch errors

我可以恢复下载还是从头开始下载,请帮我恢复下载。谢谢!

最佳答案

应用我在下面描述的修复程序后,您只需重新运行 repo sync以便恢复并完全完成被这些 fatal error 中断的资源同步过程。

您遇到的 DNS 相关错误的解决方案 [ fatal: Could not resolve host ] 在 Google 的 AOSP Developer Site已知问题解决页面上有详细说明。 .通过为您的远程存储库添加适当的主机条目来应用此修复程序 android.googlesource.com在你的开发机器里面 /etc/hosts配置文件。开始 clicking herehere执行免费网络资源提供的 IP 地址查找工具:http://network-tools.com/nslook/ .

Google 对这个问题的完整描述以及我在此处提供的详细解决方案:

Difficulties syncing the source tree (DNS issues).

Symptom: When running repo sync, the process fails with various errors related to not recognizing the hostname. One such error is <urlopen error [Errno -2] Name or service not known>. EDIT: Another fatal error might be Could not resolve host.

Cause: Some DNS systems have a hard time coping with the high number of queries involved in syncing the source tree (there can be several hundred requests in a worst-case scenario).

Fix: Manually resolve the relevant hostnames, and hard-code those results locally.

You can resolve them with the nslookup command, which will give you one numerical IP address for each of those (typically in the "Address" part of the output).

    $ nslookup googlesource.com
$ nslookup android.googlesource.com

You can then hard-code them locally by editing /etc/hosts, and adding two lines in that file, of the form:

    aaa.bbb.ccc.ddd   googlesource.com
eee.fff.ggg.hhh android.googlesource.com

Note that this will only work as long as the servers' addresses don't change, and if they do and you can't connect you'll have to resolve those hostnames again and edit etc/hosts accordingly.

关于android - Git repo 同步 - 连接丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34430917/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com