repo init
因为每次repo sync都要先repo init同步远程仓库信息,因此被墙了每次都会失败。
-u 选择镜像地址
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
是清华提供的镜像源
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
是中国科学技术大学的镜像源
用了镜像还是失败
原因就是你不是首次的init 之前的init可能用了国外的地址。导致
这时候我们来个整体的全局替换
修改文件尝试1 ~/.bashrc
sudo gedit ~/.bashrc
新增代码
# repo export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
配置生效
source ~/.bashrc
修改文件尝试2 /usr/bin/repo
#!/usr/bin/python
## repo default configuration
##
REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
REPO_REV = 'stable'
均同步失败
Get https://mirrors.tuna