windows xp 中cygwin 下载android源码
$ mkdir ~/bin$ PATH=~/bin:$PATH$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo4$ mkdir WORKING_DIRECTORY$ cd WORKING_DIRECTORY$ repo init -u https://android.googlesource.com/platform/manifestTo check out a branch other than "master", specify it with -b:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1Getting the filesTo pull down files to your working directory from the repositories as specified in the default manifest, run
?
$ repo sync?
?
?
按照上面的方法,下载时,可能报连接超时,这是因为,android源码,默认下载是用匿名方式的,google为了某种性能和管理目的,做了限制,像一 般的,动态公网IP就 可能下载不了。为此,google提供了认证方式下载。
?
?
Using authenticationBy default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.
When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).
In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.
The first step is to create a password from the password generator and to save it in ~/.netrc according to the instructions on that page.
The second step is to force authenticated access, by using the following manifest URI: https://android.googlesource.com/a/platform/manifest. Notice how the /a/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:
$ repo init -u https://android.googlesource.com/a/platform/manifest也就是,第一步,去google上产生认证信息,点击上面的"the password generator"
第二步:在cygwin当天用户目录下,新.netrc文件,并把产生的认证信息,填入。
第三步 :使用此方式,初始化repo:?? $ repo init -u https://android.googlesource.com/a/platform/manifest
?http://my.oschina.net/armsky/blog/55644?p=1#rpl_267635548
1 楼 喧嚣求静 2012-06-13 1、Git