【问题标题】:repo init fails while cloning manifest克隆清单时 repo init 失败
【发布时间】:2022-10-16 19:19:30
【问题描述】:

我正在尝试使用 repo manifest 下载 android 源代码,但由于此错误而无法继续:

android@buildserver:~/aosp$ repo init -u https://android.googlesource.com/platform/manifest
Downloading Repo source from https://gerrit.googlesource.com/git-repo
repo: error: "git" failed with exit status 128
  cwd: /home/android/aosp/.repo/repo
  cmd: ['git', 'config', 'remote.origin.url', 'https://gerrit.googlesource.com/git-repo']
  stderr:
  >> fatal: not in a git directory
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

我已经正确安装了 repo,

android@buildserver:~/aosp$ repo version
<repo not installed>
repo launcher version 2.21
       (from /usr/local/bin/repo)
git 2.25.1
Python 3.8.10 (default, Mar 15 2022, 12:22:08) 
[GCC 9.4.0]
OS Linux 5.4.0-110-generic (#124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022)
CPU x86_64 (x86_64)
Bug reports: https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue

【问题讨论】:

    标签: android android-manifest android-source repo


    【解决方案1】:

    尝试:

    git config --global --add safe.directory
    

    【讨论】:

      猜你喜欢
      • 2014-09-03
      • 1970-01-01
      • 1970-01-01
      • 2017-12-02
      • 2012-07-06
      • 2013-04-16
      • 2013-08-07
      • 2014-11-17
      • 2011-06-11
      相关资源
      最近更新 更多