Download Source Code
After completing the Ubuntu environment setup, proceed to download the source code from Gitee (register a Gitee account first).
1. Configure Git
git config --global user.name "XXXXXXX" #填写自己的用户名称
git config --global user.email "XXXXXX" #填写自己的邮箱
git config --global credential.helper store
git config --list #查看git配置是否无误2. Generate/Add SSH Public Key
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
cat ~/.ssh/id_ rsa.pub3. Install the Gitee repo Tool
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可以用 sudo -i 切换到root,安装完成后在切换回去
chmod a+x /usr/local/bin/repo #设置repo文件 a+x就是全部用户可执行
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests4. Source Code Acquisition
Because SC-3568HA fully matches the peripherals covered by the community source code, there are two ways to obtain the source code: one is the ShiMetaPi 5.0.0 source code, and the other is to obtain the community source code directly.
4.1 Obtaining the ShiMetaPi 5.0.0 Source Code
repo init -u https://gitee.com/robots778/manifest -b refs/tags/OpenHarmony-v5.0.0-Release_3568HA --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'4.2 Obtaining the Community Source Code
Taking the 5.1.0-Release version as an example, it is also downloaded via repo+https.
OpenHarmony source repository (Gitee community - deprecated): https://gitee.com/openharmony/manifestOpenHarmony source repository (Gitcode community): https://gitcode.com/openharmony/manifest
Open the Gitee or Gitcode community link above and find the Release branch name you need.

In this example, the 5.1.0-Release version is selected. Fill the -b argument of repo init below with the branch name OpenHarmony-5.1.0-Release.
# gitee 社区
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-5.1.0-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'# gitcode 社区
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-5.1.0-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'