【repo】搭建 repo 同步源码 环境 史上最详细

一、开发环境

开发环境:ubuntu16.04

二、安装配置 repo

1、创建 repo文件夹

mkdir ~/repo

2、进入 repo 文件夹

cd ~/repo

3、配置 repo

导入repo环境

export PATH=~/repo:$PATH

修改镜像源

export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

可以把环境写入.bashrc,以后就能直接用了

vim ~/.bashrc

在这里插入图片描述

4、下载 repo

如果下载失败,多下载几次

curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo

5、给 repo 权限

chmod a+x repo

猜你喜欢

转载自blog.csdn.net/weixin_44205779/article/details/108141627