给Linux的git添加清华镜像

下载

curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
为了方便可以将其拷贝到你的PATH里。

更新

repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的~/.bashrc里

export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
并重启终端模拟器。

posted @ 2022-10-10 09:21  每天都努力学习的阿凯  阅读(1006)  评论(0)    收藏  举报