repo errors

1.同步源码repo sync的时候出现以下错误

```

error: Failed connect to android.googlesource.com:443; Connection timed out while accessing 

fatal: HTTP request failed


可以尝试ping一下android.googlesource.com,如果ping不通的话,可以修改hosts。方法为,在终端中输入:

[plain]view plaincopy

sudo gedit /etc/hosts

在host文件中增加以下内容:

[plain]view plaincopy

74.125.31.82 www.googlesource.com

74.125.31.82 android.googlesource.com

203.208.46.172 cache.pack.google.com

59.24.3.173 cache.pack.google.com

注意,一定要检查该域名是否能ping通,ping不通的话再改,本人就是本来能ping通的,改完就出错了

2.Android repo 出现error.GitError: manifests rev-list ('^12303f87b9f90c07bf4aec4c4353ba514ee70c8a', 'HEAD', '--'): fatal: bad revision 'HEAD'

执行的操作

repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0

Traceback (most recent call last): File "/work/information/source_code/google/abc/.repo/repo/main.py", line 414, in _Main(sys.argv[1:]) File "/work/information/source_code/google/abc/.repo/repo/main.py", line 390, in _Main result = repo._Run(argv) or 0 File "/work/information/source_code/google/abc/.repo/repo/main.py", line 138, in _Run result = cmd.Execute(copts, cargs) File "/work/information/source_code/google/abc/.repo/repo/subcmds/init.py", line 347, in Execute self._SyncManifest(opt) File "/work/information/source_code/google/abc/.repo/repo/subcmds/init.py", line 203, in _SyncManifest m.Sync_LocalHalf(syncbuf) File "/work/information/source_code/google/abc/.repo/repo/project.py", line 1120, in Sync_LocalHalf upstream_gain = self._revlist(not_rev(HEAD), revid) File "/work/information/source_code/google/abc/.repo/repo/project.py", line 2006, in _revlist return self.work_git.rev_list(*a, **kw) File "/work/information/source_code/google/abc/.repo/repo/project.py", line 2155, in rev_list p.stderr)) error.GitError: manifests rev-list ('^HEAD', '4c2be345d6bfc25db87f23749912ae9d98d2ad62', '--'): fatal: bad revision '^HEAD'

解决办法;

删除.repo 目录下的 除 repo 文件夹之外的其它所有文件,重新执行inti和sync

可以执行: rm -rf .repo/manifest*

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,993评论 19 139
  • 大家都喜欢在刚认识你的时候就给你定性,觉得你该是怎么样的人。并把这种想法分享给你,或许你当时害羞的说你没她想的那么...
    愚人爱世界阅读 350评论 0 0
  • 夜间的春雨淅沥沥的下个不停,听着五条人乐队的晚上好,春天小姐。突然觉得那不甚标准的普通话其实也还蛮可爱蛮应...
    轻风为裳阅读 320评论 2 1
  • 突然发现自己有着深入骨髓的自卑! 我想提高自己,学习唱歌,却发现别人都比我会唱,能唱,能演,可以说几次课下来,先不...
    秋之初心阅读 177评论 0 0