android源码下载,curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo网络不可达
2013-10-15 14:25
776 查看
今天下载Android源码遇到了一点小问题,后来在一个哥们的博客上找到了答案,分享给大家
repo:http://code.google.com/p/git-repo/
之前的
curl -v https://android.git.kernel.org/repo > ~/bin/repo
已经不能用了,网址解析不到...
android.git.kernel.org现在被黑了,所以调整源码地址为:
codeaurora.org
curl http://git-repo.googlecode.com/files/repo-1.13 >
~/bin/repo
chmod a+x ~/bin/repo
PATH=~/bin:$PATH
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
repo init -u
git://codeaurora.org/platform/manifest.git
repo sync
repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread (可选)
repo sync(可选)
上述方法下载的源码最新的应该是4.1.2,经过本人多次尝试,可使用以下方法:
下载之前应该先进入https://android.googlesource.com/new-password ,登陆google账户,得到一个这种格式的数据
machine android.googlesource.com login git-.gmail.com password
machine android-review.googlesource.com login git-.gmail.com password
新建一个.netrc文件,复制以上内容到该文件中
android源码git分支查看进https://android.googlesource.com/platform/manifest
经过多次试验curl https://android.googlesource.com/a/platform/manifest >
~/bin/repo可以正常使用
但是此时repo init -u https://android.googlesource.com/a/platform/manifest -b
android-4.3_r2.1 出现以下错误提示:
../bin/repo: 行 1: 未预期的符号
newline' 附近有语法错误../bin/repo: 行 1:quot;-//IETF//DTD HTML 2.0//EN">'
改用curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"
> ~/bin/repo
然后repo init -u https://android.googlesource.com/a/platform/manifest -b
android-4.3_r2.1
此时如果还有问题将https改为http或者在.repo目录下的manifest.xml里找到fetch属性
改成
fetch="git://Android.git.linaro.org/"
最后repo sync ,OK,搞定!
相关文章推荐
- curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- android N7.1 下载fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 解决方法
- 在Eclipse 的help->Install New SoftWare Add中https://dl-ssl.google.com/android/eclipse/ 出错解决
- Android SDK Manager更新<dl-ssl.google.com> != <www.google.com> 问题解决方法
- repo1.22解决搭建Android报错:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- [置顶] win7使用msysgit下载android源码(最新地址为:https://android.googlesource.com/)
- repo 新地址 curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repo
- Android问题】解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused...
- android SDK问题:<dl-ssl.google.com> != <www.google.com>
- "Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml,reason: Connection
- [Android开发常见问题-18] Connection to https://dl-ssl.google.com refused
- 完美解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- 安卓错误Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml
- 【Android问题】解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused”的问题
- Failed to fetch URl https://dl-ssl.google.com/android/repository/addo Android SDK更新以及ADT更新出现问题的解决办法
- Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connectio
- [Issue]repo/repo init-解决同步源码Cannot get http://gerrit.googlesource.com/git-repo/clone.bundle
- 解决:Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_li ..
- 解决mac无法更新android sdk报Fetching https://dl-ssl.google.com/android/repository/addo