1. 浏览器登录https://android.googlesource.com/new-password,并用gmail帐号登录;
2. 点击网页上的“允许访问”,得到类似:Login for Git:
Username: git-gaojs.hz.cnPassword: 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5oStaying Authenticated - Linux and Mac OS X:
To stay authenticated by saving the password, append the following line to the ~/.netrc configuration file:machine android.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5omachine android-review.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5oMake sure you have set the permissions on ~/.netrc so that onlyyour user account can read the file. If your home directory is on anetwork filesystem, consider moving it to a local disk and making~/.netrc a symbolic link to the local version.Staying Authenticated - Windows:
To stay authenticated by saving the password, append the following line to the %HOME%\_netrc configuration file:machine android.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5omachine android-review.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5oEnsure %HOME% is configured in the environment to be the samelocation as %USERPROFILE%. Note that by default, Windows systems willnot define the environment variable %HOME%; you must explicitly add it:Start menu -> Computer -> (right click) -> Properties -> Advanced System Settings -> Environment VariablesMake sure you have set the permissions on %HOME%\_netrc so that only your user account can read the file.3. 把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 如果不存在此文件则自己新建一个);
4. 下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。
5. repo init -u https://android.googlesource.com/a/platform/manifest
6. repo sync
Login for Git:
Username: git-gaojs.hz.cn
Password: 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5o
Staying Authenticated - Linux and Mac OS X:
To stay authenticated by saving the password, append the following line to the ~/.netrc configuration file:
machine android.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5omachine android-review.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5oMake sure you have set the permissions on ~/.netrc so that onlyyour user account can read the file. If your home directory is on anetwork filesystem, consider moving it to a local disk and making~/.netrc a symbolic link to the local version.
Staying Authenticated - Windows:
To stay authenticated by saving the password, append the following line to the %HOME%\_netrc configuration file:
machine android.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5omachine android-review.googlesource.com login git-gaojs.hz.cn password 1/5_cUC7YGeYNn71De8of2_1m1mqzpQs6xogGZfGRoj5oEnsure %HOME% is configured in the environment to be the samelocation as %USERPROFILE%. Note that by default, Windows systems willnot define the environment variable %HOME%; you must explicitly add it:
Start menu -> Computer -> (right click) -> Properties -> Advanced System Settings -> Environment Variables
Make sure you have set the permissions on %HOME%\_netrc so that only your user account can read the file.