特别申明:我只是知识的搬运工,记录遇到的坑,感谢原创作者,感谢分享!
问题1:Your identity is
解决:https://www.linuxidc.com/Linux/2014-03/97760p2.html
下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。
因为访问基本是匿名的,为了防止连接过多,对同一IP地址的连接数做了一定的限制。用gmail帐号进行认证。
在公司网络内或者用虚拟机下载的话,会经常遇到这问题。
如果遇到下面问题
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/a/platform/manifest --config
Your Name [jianguo liao]: jianguo liao
Your Email [liaojianguo19840726@gmail.com]: liaojianguo19840726@gmail.com
Your identity is: jianguo liao liaojianguo19840726@gmail.com
is this correct [y/N]? y
repo has been initialized in /home/jianguoliao/WORKING_DIRECTORY
解决
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/platform/manifest
Your identity is: jianguo liao liaojianguo19840726@gmail.com
If you want to change this, please re-run ‘repo init’ with --config-name
或者:注意没有/a哦
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/platform/manifest --config
Your Name [jianguo liao]: jianguo liao
Your Email [liaojianguo19840726@gmail.com]: liaojianguo19840726@gmail.com
Your identity is: jianguo liao liaojianguo19840726@gmail.com
is this correct [y/N]? y
repo has been initialized in /home/jianguoliao/WORKING_DIRECTORY
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$
接着搞:
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
.repo/manifests/: discarding 88 commits
Your identity is: jianguo liao liaojianguo19840726@gmail.com
If you want to change this, please re-run ‘repo init’ with --config-name
repo has been initialized in /home/jianguoliao/WORKING_DIRECTORY
www.linuxidc.com@ubuntu:~/WORKING_DIRECTORY$
到这里我的问题已经解决啦!
问题2:A new version of repo is available
解决:https://blog.csdn.net/huangxiaominglipeng/article/details/20713889
早上在电脑上同步android的源代码(使用 repo sync),提示“A new version of repo is available”,于是下载了最新的repo(curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo)
再次执行repo还是同样的提示,仔细看看下面还有几行
error: cannot run gpg: No such file or directory
error: could not run gpg.
error: could not verify the tag ‘v1.12.0’
原来这才是root cause(经查repo是可以自我升级的),杯具的mac确实没有gpg这个命令
google找到了mac下面的gpg(https://www.gpgtools.org/),安装完成后再次执行repo sync又出现的新的错误
gpg: Can’t check signature: No public key
error: could not verify the tag ‘v1.12.0’
求助google再次找到了答案
“出错原因是曾使用repo sync从其它库sync过代码,删掉~/.repoconfig即可”
问题3: