解决Android源码下载“fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle”

Posted 高桐@BILL

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Android源码下载“fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle”相关的知识,希望对你有一定的参考价值。

问题描述:

执行“repo init -u https://android.googlesource.com/platform/manifest”命令提示“fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle”

详细如下:

root@DESKTOP-MTL291U:~/workspace/android# repo init -u https://android.googlesource.com/platform/manifest
Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 11] Resource temporarily unavailable
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

解决方案:

打开socks5相关代理,配置系统环境如下:

export http_proxy="socks5://127.0.0.1:1080"
export https_proxy="socks5://127.0.0.1:1080"

问题解决:

 

root@DESKTOP-MTL291U:~/workspace/android# export http_proxy="socks5://127.0.0.1:1080"
root@DESKTOP-MTL291U:~/workspace/android# export https_proxy="socks5://127.0.0.1:1080"
root@DESKTOP-MTL291U:~/workspace/android# repo init -u https://android.googlesource.com/platform/manifest
Downloading Repo source from https://gerrit.googlesource.com/git-repo
repo: Updating release signing keys to keyset ver 2.3

Your identity is: huangyabin001 <huangyabin001@gmail.com>
If you want to change this, please re-run 'repo init' with --config-name

Testing colorized output (for 'repo diff', 'repo status'):
  black    red      green    yellow   blue     magenta   cyan     white
  bold     dim      ul       reverse
Enable color display in this user account (y/N)? y

repo has been initialized in /root/workspace/android/
If this is not the directory in which you want to initialize repo, please run:
   rm -r /root/workspace/android//.repo
and try again.

以上是关于解决Android源码下载“fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle”的主要内容,如果未能解决你的问题,请参考以下文章

Android源代码下载过程中无法下载repo的解决方法

Mac版Android Studio查看不到源码的解决方法

解决Android SDK下载和更新失败问题

Android 解决图片大量下载:软引用必须懂4点

解决Android无法访问与下载文件的权限问题

注册谷歌帐号以及用其他镜像解决android sdk的下载问题(已解决)