我按照android官网的介绍下载android源码,以前都是可以正常下载的,但昨天下载就有问题,在repo init -u https://android.googlesource.com/platform/manifest
这一步都是正常的,repo initialized
在执行repo sync这一步就报如下错误:
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/alex/android2.3.2/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 978, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1583, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/alex/android2.3.2/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 978, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1583, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/alex/android2.3.2/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 978, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1583, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/alex/android2.3.2/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 978, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1583, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/alex/android2.3.2/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
    clone_bundle=not opt.no_clone_bundle)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 978, in Sync_NetworkHalf
    and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1519, in _ApplyCloneBundle
    exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
  File "/home/alex/android2.3.2/.repo/repo/project.py", line 1583, in _FetchBundle
    raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out> 
error: Exited sync due to fetch errors
很急啊!高手们出手帮忙解答下!谢谢!

解决方案 »

  1.   

    我弄这个问题弄了2天来,还是没有解决掉,哥们儿,如果你有办法了,请知会我一下哈,[email protected]
    thank you 
      

  2.   

     me too ,who can solve
      

  3.   

    ~/repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git    试试这个吧
      

  4.   

    Using authenticationBy default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.The first step is to create a password from the password generator and to save it in ~/.netrc according to the instructions on that page.The second step is to force authenticated access, by using the following manifest URI: https://android.googlesource.com/a/platform/manifest. Notice how the /a/ directory prefix triggers mandatory authentication. 
      

  5.   

    我也是这样问题,上一次9%,这次一开始就error了
      

  6.   

    我也出现类似的问题,但是在家里面的电脑上装了ubuntu11.10,下载没有问题,但是在公司电脑上就是不行,求救中~~
      

  7.   

    我的也出现类似问题
     raise DownloadError('HTTP %s%s' % (e.code, msg))
    DownloadError: HTTP 504 (Gateway Timeout: The gateway server did not receive a timely response)
    上网很正常,在线安装软件也正常。就是不能下载。很郁闷
      

  8.   

    Using authenticationBy default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.The first step is to create a password from the password generator and to save it in ~/.netrc according to the instructions on that page.The second step is to force authenticated access, by using the following manifest URI: https://android.googlesource.com/a/platform/manifest. Notice how the /a/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:$ repo init -u https://android.googlesource.com/a/platform/manifest
    哈哈,貌似可以了
      

  9.   

    关于下载android源码初次下载成功,再次下载不成功的问题,得益于google以及各位网友们的大力提示,我的解决方法如下:
    $ PATH=~/bin:$PATH
    $ repo init -u https://android.googlesource.com/a/platform/manifest
    没错的话,估计这时会提示你输入username,随便输入,接着是password再随便输入,接下来该提示你错误了,接着后面会给出一个网址,再接下来在浏览器里访问那个网址你就知道要怎么弄了!
      

  10.   

    $ repo init -u https://android.googlesource.com/a/platform/manifest
    这个可以用
      

  11.   

    这么久没解决?刚好也遇到了,这样解决:
    http://blog.csdn.net/thl789/article/details/7524232
      

  12.   

    repo init 后面跟/a/的地址后,出现提示错误信息,跟一个网址,进入下面那个网址,按要求输入一个用户名和密码后,会生成一对新的用户名和密码,并将下面的两行以machine开头的内容copy进~/.netrc文件中,保存退出。
    再次执行 repo sync。
      

  13.   

    请问楼主  你下载下来的文件 有.java文件没
    为什么我下载下来的都是写 .git 文件 看不懂 悲剧。
      

  14.   

    https://android.googlesource.com/a/platform/manifest 换这个就ok!