repo使用问题---出现404问题的解决方法

repo出现404的解决方法

  • 原因
  • 报错现象
  • 解决方法

原因

出现404,主要时在使用repo时,需要预下载部分repo工具的相关插件,所以一般在设置repo工具时,我们会将repo中
预下载的部分从官网上拉取下来,放在自己的仓库中,以便增加下载速度,但是这个仓库可能会发生改变,这时本地的
repo在使用时就会报错

报错现象

repo init -u [email protected]:j3/manifest.git -m manifest_j3.xml
Downloading Repo source from [email protected]:VehicleServer2/repo-git.git
Access deined: 404 Not Found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
repo: error: “git” failed with exit status 128
cwd: /media/C/XA/test/.repo/repo
cmd: [‘git’, ‘fetch’, ‘–quiet’, ‘–progress’, ‘origin’, ‘+refs/heads/:refs/remotes/origin/’, ‘+refs/tags/:refs/tags/’]
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove ‘.repo/repo’

解决方法

找到repo安装工具
例如:我的repo安装在~/.bin/repo下
1、打开
vim ~/.bin/repo
2、修改
REPO_URL = os.environ.get(‘REPO_URL’, None)
if not REPO_URL:
REPO_URL = ‘[email protected]:opensource/repo-git.git’ //修复位置和内容
REPO_REV = os.environ.get(‘REPO_REV’)
if not REPO_REV:
REPO_REV = ‘stable’

你可能感兴趣的:(YOCTO学习,杂记,Linux,git)