解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
来源:互联网 发布:睡女神什么体验 知乎 编辑:程序博客网 时间:2024/05/16 10:33
转自:http://blog.csdn.net/xiaokeweng/article/details/46743409
【错误】
leo@leo-weng:~$repo init-u https://android.googlesource.com/platform/manifest
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
【原因】
当repo init时,执行的repo是环境变量里面默认的repo,这个repo只是单纯一个几百行的python脚本
而不是完整的repo-project,所以要先去网络远端sync完整的repo-project,
因为repo也是开源项目,设计者出于维护和使用体验,每次repo init时候都要从远端sync最新的版本
(浏览器开https://gerrit.googlesource.com/git-repo/clone.bundle可以看到维护的history,当然了,前提是当时网络可以通过GFW)
在repo init成功情况sync的project会在./.repo/repo这个路径,包含repo所有功能逻辑的python脚本,
而正是因为远端的git server的域名gerrit.googlesource.com会被GFW挡掉。
就会出现Network is unreachable,运气不好的时候可能一整天都没办法init成功。
【解决一】(推荐)
(该博客2016年更新)该问题可以通过增加如下option解决,该repo project有清华镜像源提供
--repo-url=https://gerrit-google.tuna.tsinghua.edu.cn/git-repo
https://gerrit-google.tuna.tsinghua.edu.cn/git-repo
同时清华TUNA源还提供完整android源码(AOSP),参考link :https://mirrors.tuna.tsinghua.edu.cn
【实例】
//跑PATH中default的repo,git clone时fail
leo@leo-weng:~$repo init-uXXXX.xml
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
//下载repo-project并用${Download_path}/repo/repo 来替换上一条中的repo,绕开sync直接init成功
Get /home/leo/Download/repo/.git
remote: Counting objects: 3091, done.
remote: Compressing objects: 100% (1144/1144), done.
remote: Total 3091 (delta 1893), reused 3091 (delta 1893)
Receiving objects: 100% (3091/3091), 1.56 MiB, done.
Resolving deltas: 100% (1893/1893), done.
From /home/leo/Download/repo/
* [new branch] default -> origin/default
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
【下载repo project】
我直接在CSDN上面上传了,是15年6月左右最新更新的版本:
http://download.csdn.net/detail/xiaokeweng/8872981- 完美解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- 解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- 解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- repo init报错Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- (OK) fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- android N7.1 下载fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 解决方法
- repo1.22解决搭建Android报错:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- [Issue]repo/repo init-解决同步源码Cannot get http://gerrit.googlesource.com/git-repo/clone.bundle
- curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- android源码下载,curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo网络不可达
- Git & Repo & Gerrit
- GIT & REPO & GERRIT (一)
- GIT & REPO & GERRIT (二)
- GIT & REPO & GERRIT (三)
- GIT & REPO & GERRIT (四)
- GIT & REPO & GERRIT (一)
- mvc与mvp区别
- List列表的运用
- 关于eclipse中同步代码报错checkout conflict with files的解决方法
- Tomcat学习之Wrapper
- svn外网更新下载代码步骤
- 解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- 关于String的创建,在池(pool)还是在堆中。
- 集合问题(poj)
- 回归帖
- Tomcat学习之ClassLoader
- POJ 2987 Firing (最大权闭合图)
- pat 1021. Deepest Root (25)
- 【Creator】教学视频笔记
- 传送门的一对多点传送程序