(1)下载
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
sudo mv repo /usr/local/bin/
(2)repo的运行过程中会尝试访问官方(Google)的git源更新自己(有墙),如果想使用清华tuna的镜像源进行更新,可以将如下内容复制到你的~/.bashrc里
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
(3)重启终端
参考链接:https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/