上传到评论服务器时用户名错误

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

我正在尝试将修补程序推送到Gerrit服务器,已生成SSH密钥并添加到设置中。但是,当我尝试推送(回购上载)时,它显示了另一个用户名,因此我没有推送的权限。

我尝试使用git config设置我的用户名,但根本无法使用。

执行ssh -vv -p 29418 [email protected],但不起作用ssh -vv -p 29418 [email protected]

顺便说一下,我的电子邮件是[email protected],也许是重要信息吗?

在控制台中,

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

但实际上应该是[email protected]

gerrit repo
1个回答
1
投票

您需要为repo upload配置Git配置

$ git config --global review.gerrit.aospa.co.username genesis331

repo文档可能会为您提供更多信息:

$ repo help upload
[...]
review.URL.username:

Override the username used to connect to Gerrit Code Review. By default
the local part of the email address is used.

The URL must match the review URL listed in the manifest XML file, or in
the .git/config within the project. For example:

  [remote "origin"]
    url = git://git.example.com/project.git
    review = http://review.example.com/

  [review "http://review.example.com/"]
    autoupload = true
    autocopy = [email protected],[email protected]
[...]
© www.soinside.com 2019 - 2024. All rights reserved.