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/'

 

參考:https://community.nxp.com/docs/DOC-343242


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM