Chapter 2 Download Source Code
After completing the Ubuntu environment setup, proceed to download the source code from Gitee (note: a Gitee account registration is required).
1. Configure Git
git config --global user.name "XXXXXXX" #Enter your username
git config --global user.email "XXXXXX" #Enter your email address
git config --global credential.helper store
git config --list #Verify Git configuration
2. Generate/Add SSH Public Key
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
cat ~/.ssh/id_ rsa.pub
3. Install the Gitee repo tool
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #If you lack sufficient privileges, you can switch to the root user using sudo -i, then revert to your regular user account after completing the installation.
chmod a+x /usr/local/bin/repo #Setting repo file permissions to a+x grants executable access to all users
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
- Source code acquisition
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'