git config –global user.name “yourname”
git config –global user.email “your-email-address”
git config –global credential.helper store
2.安装repo工具
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
## 如果上述 URL 不可访问,可以用下面的:
## curl -sSL ‘https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT’ |base64 -d > ~/bin/repo
chmod a+x ~/bin/repo
或者码云
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 chmod a+x /usr/local/bin/repo pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
3.OpenHarmony主干代码获取
-
方式一(推荐):通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify repo sync -c repo forall -c 'git lfs pull'
方式二:通过repo + https下载。
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo sync -c repo forall -c 'git lfs pull'