来自:http://blog.csdn.net/u010856630/article/details/51678745
1.先安装git
sudo apt-get install git-core curl
2.下载repo
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
3.PATH=~/git-repo:$PATH
如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo文件,把 REPO_URL 一行替换成下面的:
REPO_URL = 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo'