android–repo sync导致“致命:不是git存储库:’working_dir.repoprojectsexternalipsec-tools.git’”

android–repo sync导致“致命:不是git存储库:’working_dir.repoprojectsexternalipsec-tools.git’”,第1张

概述我正在尝试下载Android源代码并遵循https://source.android.com/source/downloading.html中描述的过程,其中包括安装repo脚本然后运行$repoinit-uhttps://android.googlesource.com/platform/manifest$reposync获得主要分支.我也尝试使用-f-j1标志来解决错误,并且只使用

我正在尝试下载Android源代码并遵循https://source.android.com/source/downloading.html中描述的过程,其中包括安装repo脚本然后运行

$repo init -u https://androID.Googlesource.com/platform/manifest$repo sync

获得主要分支.我也尝试使用-f -j1标志来解决错误,并且只使用一个核心,就像在线提到的那样.在这一点上,我认为我非常接近整个事情的下载,但在使用ipsec-tools时它总是会停止到最后.它总是提供以下输出:

    Fetching project platform/external/ipsec-tools  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    left  Speed100     1  100     1    0     0      3      0 --:--:-- --:--:-- --:--:--     3100 1690k  100 1690k    0     0  2307k      0 --:--:-- --:--:-- --:--:-- 2307kfatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'Traceback (most recent call last):  file "/home/sebastian/WORKING_DIR/.repo/repo/main.py", line 500, in <module>    _Main(sys.argv[1:])  file "/home/sebastian/WORKING_DIR/.repo/repo/main.py", line 476, in _Main    result = repo._Run(argv) or 0  file "/home/sebastian/WORKING_DIR/.repo/repo/main.py", line 155, in _Run    result = cmd.Execute(copts, cargs)  file "/home/sebastian/WORKING_DIR/.repo/repo/subcmds/sync.py", line 635, in Execute    fetched = self._Fetch(to_fetch, opt)  file "/home/sebastian/WORKING_DIR/.repo/repo/subcmds/sync.py", line 339, in _Fetch    self._FetchProjectList(**kwargs)  file "/home/sebastian/WORKING_DIR/.repo/repo/subcmds/sync.py", line 234, in _FetchProjectList    success = self._FetchHelper(opt, project, *args, **kwargs)  file "/home/sebastian/WORKING_DIR/.repo/repo/subcmds/sync.py", line 275, in _FetchHelper    no_Tags=opt.no_Tags, archive=self.manifest.IsArchive)  file "/home/sebastian/WORKING_DIR/.repo/repo/project.py", line 1110, in Sync_NetworkHalf    no_Tags=no_Tags)):  file "/home/sebastian/WORKING_DIR/.repo/repo/project.py", line 1845, in _RemoteFetch    self.bare_git.pack_refs('--all', '--prune')  file "/home/sebastian/WORKING_DIR/.repo/repo/project.py", line 2483, in runner    p.stderr))error.GitError: platform/external/ipsec-tools pack-refs: fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'

因为它说它不是一个git存储库,所以我只是预感并在它指示的目录上运行git init,这不起作用.我还尝试删除整个ipsec-tools.git目录并再次运行repo sync,以便它从头开始,但它总是给出相同的错误.

有任何想法吗?

解决方法:

无需从头开始同步. AndroID是一个从头开始下载的大型存储库,为了节省时间和互联网,可以删除特定的git存储库(通常我只看到1个git目录已损坏)并重新运行同步.

repo将项目存储在

.repo/projects

但这些只是存储在其中的实际git数据的软链接

.repo/project-objects

按照“项目”中的链接删除两个存储库并再次运行同步.
它对我有用.

平台/框架/支持的示例:

rm -fr .repo/projects/frameworks/support.git/ .repo/project-objects/platform/frameworks/support.git/

仅同步此项目:

repo sync -j4 platform/frameworks/support

[我想将此添加为评论,但它不允许我 – 所以添加为答案]

总结

以上是内存溢出为你收集整理的android – repo sync导致致命:不是git存储库:’working_dir / .repo / projects / external / ipsec-tools.git’”全部内容,希望文章能够帮你解决android – repo sync导致“致命:不是git存储库:’working_dir / .repo / projects / external / ipsec-tools.git’”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1110735.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存