2011-12-17 112 views
4

我使用回购有问题。 我下载的VirtualBox并安装在Windows 7主机,其中客户OS的Ubuntu 11.10。 我跟着指示http://source.android.com/source/downloading.html。 不幸的是做回购同步我的时候不断收到下面的问题:?回购同步失败(221分之73

Fetching projects: 33% (73/221) error: Cannot fetch platform/bootable/bootloader/legacy 
error: Cannot fetch platform/bionic 
Exception in thread Thread-78: 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner 
    self.run() 
    File "/usr/lib/python2.7/threading.py", line 505, in run 
    self.__target(*self.__args, **self.__kwargs) 
    File "/home/nir/WORKING_DIRECTORY/.repo/repo/subcmds/sync.py", line 186, in _FetchHelper 
    current_branch_only=opt.current_branch_only) 
    File "/home/nir/WORKING_DIRECTORY/.repo/repo/project.py", line 926, in Sync_NetworkHalf 
    if alt_dir is None and self._ApplyCloneBundle(initial=is_new, quiet=quiet): 
    File "/home/nir/WORKING_DIRECTORY/.repo/repo/project.py", line 1463, in _ApplyCloneBundle 
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet) 
    File "/home/nir/WORKING_DIRECTORY/.repo/repo/project.py", line 1527, in _FetchBundle 
    raise DownloadError('%s: %s ' % (req.get_host(), str(e))) 
DownloadError: android.googlesource.com: <urlopen error [Errno -2] Name or service not known> 

error: Couldn't resolve host 'android.googlesource.com' while accessing https://android.googlesource.com/platform/external/libpcap/info/refs 

fatal: HTTP request failed 
error: Couldn't resolve host 'android.googlesource.com' while accessing https://android.googlesource.com/platform/external/libphonenumber/info/refs 

fatal: HTTP request failed 
error: The requested URL returned error: 403 while accessing https://android.googlesource.com/platform/external/libpcap/info/refs 

fatal: HTTP request failed 
error: The requested URL returned error: 403 while accessing https://android.googlesource.com/platform/external/libphonenumber/info/refs 

fatal: HTTP request failed 
error: Cannot fetch platform/external/libpcap 
error: Cannot fetch platform/external/libphonenumber 

error: Exited sync due to fetch errors 

没有人知道是什么问题

感谢您的帮助 NIR

回答

0

我也有这个问题,所以我再次阅读下载教程,现在解决。 见下:

第一步是从the password generator创建密码,并根据该页面上的说明将其保存在〜/ .netrc中。您需要有一个Google帐户。

第二步是通过使用以下清单URI强制验证访问:https://android.googlesource.com/a/platform/manifest。说:

$回购的init -u https://android.googlesource.com/a/platform/manifest

然后说: $回购同步 它会开始下载一切

希望它可以帮助ü

0

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

谷歌对这个问题有具体的解决充分说明我在这里包括:

困难同步源代码树(DNS问题)。

症状:当运行回购同步,过程中失败,并与不承认的主机名各种错误 。其中一个错误是 <urlopen error [Errno -2] Name or service not known>编辑:另一个查找错误可能是error: Couldn't resolve host

原因:一些DNS系统也很难与参与同步的源代码树的查询大量 应对(有可能是在最坏的情况下几个 百请求)。

修复:手动解析相关主机名,并在本地硬编码这些 结果。

你可以用nslookup命令,它会给你一个 数字IP地址为每个(通常在输出的“地址” 部分)解决这些问题。

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

您可以然后将它们在本地硬编码通过编辑/ etc/hosts文件,并在文件中添加表格两条 线:

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

请注意,这只会只要 服务器的地址不改工作,如果他们这样做,你不能连接 你将不得不重新解决这些主机名和编辑etc/hosts中 相应。