9月10号左右下过一次android源代码,下了6%之后就死活下不了,不是提示连接失败就是提示没有任何数据返回,最后网上人说android.git.kernel.org网站被黑了,git方式和http方式都下不了,折腾好些时间终于知道怎么配置文件,最后网站被黑却下不了,灰常悲催。
今天晚上试了一下,还是不行,最后google了一下,在网上找到了答案。下面写一个完整的步骤供大家参考(ubutun系统),欢迎批评指正。
1.安装git
sudo apt-get install git-core
2.安装curl
sudo apt-get install git-core curl
3.安装repo, 通过curl下载repo
curl http://git-repo.googlecode.com/files/repo-1.12 > ~/bin/repo
4.给repo可执行权限
chmod a+x ~/bin/repo
5.修改~/bin/repo文件将第五行
REPO_URL='https://code.google.com/p/git-repo/'
改为
REPO_URL='http://code.google.com/p/git-repo/'
否则会出现error:Failed connect to code.google.com:443; Operation now in progress while accessing https://code.google.com/p/git-repo//info/refs
6.然后向PATH中添加bin路径:
export PATH=$PATH:~