完美解决国内仓库repo init和repo sync

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
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值