无法使用 chromium.googlesource.com 验证 git

问题描述 投票:0回答:1

当我意识到我需要通过 https://chromium.googlesource.com 的存储库进行身份验证时,我正在按照 https://skia.org/docs/user/download/ 中的设置说明进行操作。问题是,当我导航到 chromium.googlesource.com/new-password 以生成密码时,我按照设置说明将其提供的脚本粘贴到我的终端会话中。然后我重新运行克隆,但出现错误

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
remote: INVALID_ARGUMENT: Request contains an invalid argument
remote: [type.googleapis.com/google.rpc.LocalizedMessage]
remote: locale: "en-US"
remote: message: "Invalid authentication credentials. Please generate a new identifier: https://chromium.googlesource.com/new-password"
remote:
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "f6caddf116ae43f0902e33b7d103fb04"
fatal: unable to access 'https://chromium.googlesource.com/chromium/tools/depot_tools.git/': The requested URL returned error: 400

一般权限错误。我已经尝试了多次,以确保我没有做任何愚蠢的事情,包括撤销和重新生成 cookie,手动将其粘贴到我的

~/.gitcookies
中,而不是使用脚本,将其放入我的
~/.netrc
中。

我没有代理。我使用的是 Ubuntu 20.04。还有其他新用户遇到这个问题吗?

git skia google-source-repositories depottools
1个回答
0
投票

经过大量调试并在不同的机器上尝试后,我意识到我在 git 配置中将 Bearer Auth Token 设置为 http.extraheader 。我不知道它是如何到达那里的,但是一旦我将其注释掉,我就能够成功克隆。似乎 google 的 api 对这类东西比 github 更严格。

© www.soinside.com 2019 - 2024. All rights reserved.