repo: error: "git" failed with exit status 1

2,076 阅读1分钟

repo init 报如下错误,有哪位大神碰到过,帮忙解答一下,万分感谢!

Downloading Repo source from https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
remote: Enumerating objects: 7372, done.
remote: Counting objects: 100% (7372/7372), done.
remote: Compressing objects: 100% (3935/3935), done.
remote: Total 7372 (delta 4765), reused 5577 (delta 3363)
接收对象中: 100% (7372/7372), 3.28 MiB | 1.71 MiB/s, 完成.
处理 delta 中: 100% (4765/4765), 完成.
repo: error: "git" failed with exit status 1
  cwd: /home/lixuanlin/aosp/.repo/repo
  cmd: ['git', 'tag', '-v', 'v2.22']
  stderr:
  >> error: 不能创建临时文件 '/tmp/.git_vtag_tmpDftUFw':不允许的操作
  >> error: 不能校验该标签 'v2.22'
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo' 

repo 安装方式如下:

curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo

解决方法

repo init -u aosp.tuna.tsinghua.edu.cn/platform/ma… -b android-12.0.0_r8 --no-repo-verify 添加 --no-repo-verify 参数