1、ubuntu下载安装repo
$sudo curl https://storage.googleapis.com/git-repo-downloads/repo > /tools/repo_bin/repo
显示失败curl: (7) Failed to connect to 2404:6800:4008:803::2010: Network is unreachable
可以在浏览器中输入网址https://storage.googleapis.com/git-repo-downloads/repo,完成下载repo,或者改变目录试下,下载完成后
$chmod a+x /tools/repo_bin/repo
$PATH=/tools/repo_bin:$PATH
2、$repohelp
$repohelp init
$repo status .
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$repo init
gpg: keyring `/home/htp828/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/home/htp828/.repoconfig/gnupg/pubring.gpg' created
gpg: /home/htp828/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" imported
gpg: key 692B382C: public key "Conley Owens <cco3@android.com>" imported
gpg: Total number processed: 2
gpg: imported: 2 (RSA: 1)
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
$repo init -u https://android.googlesource.com/platform/manifest
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
解决方法:可能是没有翻墙的原因。
3、$git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
$ cd WORKING_DIRECTORY
$mkdir .repo
将下载的git-repo拷贝到.repo下,并改名为 repo
可以重新初始化了
$repo initrepo init -u xxxxxxxxx -b xxxx
fatal: manifest url (-u) is required.