错误的核心就是 error android.googlesource.com/platform/manifest/info/refs,参考这里 这是google防止匿名访问连接次数过多而设置的。
解决方法是:浏览器登录https://android.googlesource.com/new-password,输入自己的gmail帐号,点击网页上的“确定”或“允许访问”会得到如下信息(我只找到了确定按键):
Login for Git:
Username: git-yanzi1225627.gmail.com
Password: 1/IwTl_VomaQWIk0I4gRjdDL5SybS8MGDv15Cb0bLonMg
Staying Authenticated:
To stay authenticated by saving the password, append the following line to the ~/.netrc configuration file:
machine android.googlesource.com login git-yanzi1225627.gmail.com password 1/IwTl_VomaQWIk0I4gRjdDL5SybS8MGDv15Cb0bLonMg machine android-review.googlesource.com login git-yanzi1225627.gmail.com password 1/IwTl_VomaQWIk0I4gRjdDL5SybS8MGDv15Cb0bLonMg
Make sure you have set the permissions on ~/.netrc so that only your user account can read the file. If your home directory is on a network filesystem, consider moving it to a local disk and making ~/.netrc a symbolic link to the local version.
新建一个.netrc文件,gedit ~/.netrc,如果有的话就不用新建了。在linux里前面有个"."表示这个文件是隐藏文件。在里面输入machine开头的两行话保存即可。