【环境搭建】2、配置 repo 环境

repo是比较方便的进行多个仓库的代码拉取和管理的

通过repo下载所需要的代码

设置repo

1
2
3
4
5
6
7
8
9
mkdir tool
cd tool
mkdir bin
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > ./bin/repo
chmod a+x ./bin/repo

# 如果你的路径和我的一致,那么下面的命令就可以帮助你设置环境变量
echo 'export PATH=/home/user/tool/bin:$PATH'>> ~/.bashrc
source ~/.bashrc

设置邮箱

1
2
3
git config --global user.name "you name"
git config --global user.email "you email"
git config --global credential.helper store

通过repo下载代码

1
2
3
4
5
# 拉取OpenHarmony代码
repo init -u https://gitee.com/pandaboard/pandaboard_manifest.git -b pandaboard_gd32_ohos_4.1.1 --no-repo-verify

repo sync -c
repo forall -c 'git lfs pull'
1
2
3
4
5
# 拉取Makefile+FreeRTOS代码
repo init -u https://gitee.com/pandaboard/pandaboard_manifest.git -b pandaboard_gd32_frtos --no-repo-verify

repo sync -c
repo forall -c 'git lfs pull'

设置 repo(有问题)

1
2
3
4
5
6
7
8
mkdir bin
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > ./bin/repo
chmod a+x ./bin/repo

# or

echo 'export REPO_URL="https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/"'>> ~/.bashrc
source ~/.bashrc
坎坷,源自内心的恐惧 ~
主题 StackJimmy 设计 biu~ biu~