## 获取源码 * 步骤1:注册码云[gitee账号](https://gitee.com/signup)。 * 步骤2:在Ubuntu的用户目录下,分步执行下面的命令,安装[git客户端](https://git-scm.com/book/zh/v2/起步-安装-Git)和[git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading)并配置用户信息。 ``` sudo apt install git git-lfs curl -y git config --global user.name "yourname" # 你自己gitee的用户名 git config --global user.email "your-email-address" # 你自己gitee绑定的邮箱地址 git config --global credential.helper store ``` * 步骤3:在Ubuntu的用户目录下,分步执行下面的命,安装码云repo工具 ``` curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > repo sudo cp repo /usr/local/bin/repo sudo chmod a+x /usr/local/bin/repo pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests ``` * 步骤4:分步执行下面的命令,配置python3环境 ``` cd /usr/bin sudo ln -s /usr/bin/python3.8 python ``` * 步骤5:执行下面的命令,通过repo + https下载**OpenHarmony**主干代码 ``` cd ~ mkdir OpenHarmony_master cd OpenHarmony_master repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo sync -c repo forall -c 'git lfs pull' repo forall -c git checkout -b weekly_20220419 bash build/prebuilts_download.sh ```