ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

完美的失败方案让 repo init 安卓源码仓库恢复到最初状态

2021-11-07 13:59:02  阅读:1053  来源: 互联网

标签:googlesource git 安卓 gerrit repo init 源码 https


repo sync -d

报错

The program 'repo' can be found in the following packages:
 * phablet-tools
 * repo
Try: sudo apt install <selected package>

安装repo

sudo apt install repo

没有repo init

error: command 'sync' requires repo to be installed first.
         Use "repo init" to install it here.

进入.repo文件夹

cd ./.repo

初始化repo init 失败

因为每次都要去查询 所以要每次的初始化

repo init

fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 110] Connection timed out

链接仓库失败

修改初始化语句 替换为清华源

repo init -u https://android.googlesource.com/platform/manifest --repo-url https://gerrit-google.tuna.tsinghua.edu.cn/git-repo

还是失败

repo init -u https://android.googlesource.com/platform/manifest --repo-url https://gerrit-google.tuna.tsinghua.edu.cn/git-repo
fatal: Cannot get https://gerrit-google.tuna.tsinghua.edu.cn/git-repo/clone.bundle
fatal: error [Errno -2] Name or service not known

再次更换

repo init  --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

再次失败

repo init  --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo/clone.bundle
Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
fatal: unable to access 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

repo init -u --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

最终办法 直接上代理

虚拟机配置代理地址 192.168.10.10 1080

访问谷歌没问题了

再次上

还是失败

repo init
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 110] Connection timed out

关闭刚才那个命令行窗口 重来几次次

失败 失败 失败

$ repo init
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connect to gerrit.googlesource.com port 443: Connection timed out
tom@ubuntu:~/Android8.0/android-8.0.0_r1/.repo$ repo init
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error EOF occurred in violation of protocol (_ssl.c:590)
tom@ubuntu:~/Android8.0/android-8.0.0_r1/.repo$ repo init
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connect to gerrit.googlesource.com port 443: Connection timed out

再搜搜解决方案

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest是清华提供的镜像源
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest是中国科学技术大学的镜像源

标签:googlesource,git,安卓,gerrit,repo,init,源码,https
来源: https://blog.csdn.net/lw_zhaoritian/article/details/121190695

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有