欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 锐评 > android-ndk开发(11): 安装 repo 命令

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

2025/11/10 10:32:39 来源:https://blog.csdn.net/baiyu33/article/details/147838497  浏览:    关键词: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/

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词