下载android源码时出现http请求错误到解决办法

来源:互联网 发布:js 解析xml 编辑:程序博客网 时间:2024/06/07 22:24

登录https://android.googlesource.com/new-password,并用gmail帐号登录,点击网页上的“允许访问”,得到类似这样的东西:

machine android.googlesource.com login git-xxxxxxx password 1/xxxxxxxxxxxxxxxxxxxxxmachine android-review.googlesource.com login git-xxxxxxx password 1/xxxxxxxxxxxxxxxxxxxxxxxxx

把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 如果不存在此文件则自己新建一个)


下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。


即可拉下Android源码。

官方的说法是:因为访问基本是匿名的,为了防止连接过多(指内网/虚拟机),对同一IP地址的连接数做了一定的限制。看来是用gmail帐号进行认证。

这样的话,在公司网络内或者用虚拟机下载的话,会经常遇到这问题。


原创粉丝点击