当前位置: 首页 > news >正文

android-ndk开发(11): 安装 repo 命令

1. 长话短说

mkdir ~/soft/bin
curl -L https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo

~/.pathrc 添加:

export PATH=$PATH:~/soft/bin

2. 短话长说

repo 的官方介绍页面: https://gerrit.googlesource.com/git-repo/

repo 的官方下载地址: https://storage.googleapis.com/git-repo-downloads/repo

为啥不用官方的? 因为网络不好。 如果安装了, 即便开启代理, 使用仍然报错:

➜  android-ndk repo init -u https://android.googlesource.com/platform/manifest -b master-ndk --partial-cloneDownloading Repo source from https://gerrit.googlesource.com/git-repo
致命错误:无法访问 'https://gerrit.googlesource.com/git-repo/':The requested URL returned error: 429
repo: error: "git" failed with exit status 128cwd: /Users/zz/work/android-ndk/.repo/repo.tmpcmd: ['git', 'fetch', '--quiet', '--progress', 'origin', '+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

查看源码:

REPO_URL = os.environ.get("REPO_URL", None)
if not REPO_URL:REPO_URL = "https://gerrit.googlesource.com/git-repo"

恭喜你, 折返回到清华大学镜像: https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/

3. 参考链接

  • https://mirrors.tuna.tsinghua.edu.cn/git/git-repo

  • https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/

http://www.xdnf.cn/news/351559.html

相关文章:

  • MySQL + Elasticsearch:为什么要使用ES,使用场景与架构设计详解
  • NAT穿越
  • 力扣-24.两两交换链表中的结点
  • SpringBoot默认并发处理(Tomcat)、项目限流详解
  • 【列表类型】
  • Spring Boot + MyBatis-Plus 高并发读写分离实战
  • 人工智能 机器学习期末考试题
  • Android RxJava框架分析:它的执行流程是如何的?它的线程是如何切换的?如何自定义RxJava操作符?
  • 内存安全革命:工具、AI 与政策驱动的 C 语言转型之路
  • 安全核查基线-3.用户umask设置策略
  • 数字IC前端学习笔记:锁存器的综合
  • Vue3 + Element Plus 动态表单实现
  • 对PyTorch模块进行性能分析
  • 一种海杂波背景下前视海面目标角超分辨成像方法——论文阅读
  • 【Python 元组】
  • Docker容器启动失败?无法启动?
  • 一些模型测试中的BUG和可能解决方法
  • linux系统管理
  • Java+Selenium+快代理实现高效爬虫
  • 通用外设驱动模型(四步法)
  • 探索大型语言模型的 LLM 安全风险和 OWASP 十大漏洞
  • (x ^ 2 + 2y − 1) ^ 3 − x ^ 2 * y ^ 3 = 1
  • React Native 前瞻式重大更新 Skia WebGPU ThreeJS,未来可期
  • AI客服问答自动生成文章(基于deepseek实现)
  • JAVA简单例题+抽象+继承
  • openssl中BIO的使用
  • PostgreSQL创建只读账号
  • 数据中台建设系列(五):SQL2API驱动的数据共享与服务化实践
  • 游戏引擎学习第266天:添加顶部时钟概览视图。
  • TensorFlow深度学习实战(15)——编码器-解码器架构