项目场景:

使用repo下载sdk,出现下列错误
Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 110] Connection timed out
fatal: cloning the git-repo repository failed, will remove ‘.repo/repo’

Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 110] Connection timed out
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

原因分析:

repo在google需要翻墙

解决方案:

1 下载repo包

https://gitee.com/jqbetter/repo.git

解压后将包里的文件复制到~/bin/文件夹

2 配置

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
echo  "export PATH=~/bin:$PATH"
source ~/.bashrc

3使用国内源进行init

repo init -u git_ip -b branch_name --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
repo sync
repo start branch_name --all
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐