无法获取https://gerrit.googlesource.com/git-repo/clone.bundle

use*_*187 7 git github repository repo

我尝试根据“ source.android.com/source/downloading.html#installing-repo”中的说明创建一个git repo

但是尝试在工作目录(使用Ubuntu)中初始化存储库时收到以下错误:

:〜/ workdir $ repo init -u https://android.googlesource.com/a/platform/manifest
致命:无法获取https://gerrit.googlesource.com/git-repo/clone.bundle
致命:错误[Errno -2]名称或服务未知

我已经使用生成的密码创建了〜/ .netrc文件,并且还设置了HTTP_PROXY和HTTPS_PROXY变量。
当我尝试通过浏览器访问上面的clone.bundle链接时,出现“未找到”错误。
请让我知道是否需要做一些其他设置。提前致谢。

小智 9

错误

fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Run Code Online (Sandbox Code Playgroud)

您可以针对此问题修改此 repo 文件,请按照以下命令操作

sudo cp /usr/bin/repo /usr/bin/repo_bak
sudo vi /usr/bin/repo

Run Code Online (Sandbox Code Playgroud)

在“导入系统”之后插入以下详细信息

import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Run Code Online (Sandbox Code Playgroud)

然后保存此文件,然后重试


JLa*_*JLa 2

仅供参考:我是如何解决的:

我的错误的第二行是不同的:

fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Run Code Online (Sandbox Code Playgroud)

但上面问题中的评论对我有用(下载clone.bundle,并使用--repo-url选项)。然而,它在 .repo/ 中的 python 代码中给出了错误。但我忽略了这一点,repo sync命令成功了。

  • You need to manually download clone.bundle with your browser, e.g. to ~/Downloads. Then do 'repo init -u .... --repo-url ~/Downloads/clone.bundle' (3认同)