Chapter 2 Download Source Code
After completing the Ubuntu environment setup, start downloading the source code from Gitee (register a Gitee account).
1. Configure Git
git config --global user.name "XXXXXXX" # Fill in your username
git config --global user.email "XXXXXX" # Fill in your email
git config --global credential.helper store
git config --list # Check if git configuration is correct2. Generate/Add SSH Public Key
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
cat ~/.ssh/id_rsa.pub3. Add the Public Key Generated in Step 2 in Gitee Official Website Personal Settings
4. Install Gitee Repo Tool
sudo -i # Switch to root
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo
chmod a+x /usr/local/bin/repo # Set repo file a+x means all users can execute
exit # Switch back to the original user
sudo vim /usr/local/bin/repo # Need to manually change python on the first line to python3
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests5. Obtain 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'