fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
In i.MX Yocto Project User's Guide document
Quick Start part:
Install the `repo` utility:
To get the BSP you need to have "repo" installed. This only needs to be done once.
$: mkdir ~/bin
$: curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$: chmod a+x ~/bin/repo
$: PATH=${PATH}:~/bin
由于这里安装repo的REPO_URL是谷歌的源,而由于国内“墙”的原因导致下载失败,错误为
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
针对这个问题,解决方案如下:
1. 获取repo
# cd ~
# mkdir bin
# cd bin
# curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
# chmod a+x ~/bin/repo
# export PATH=${PATH}:~/bin
2. 修改repo文件
打开~/bin/repo文件并修改google地址
# vi ~/bin/repo
From
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
To
REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步