gpt4 book ai didi

git - 调试 'repo upload' 问题 - 权限被拒绝(公钥)

转载 作者:太空狗 更新时间:2023-10-29 13:48:27 24 4
gpt4 key购买 nike

我们正在尝试为代码审查设置一个 Gerrit 实例,并计划在中使用“repo”。我能够直接推送到 Gerrit,但是使用 repo upload 失败并出现公钥错误:

user@machine:~/workspace/git/gerrit-test$ repo upload
Upload project path/gerrit_test/ to remote branch master:
branch master ( 1 commit, Fri Aug 3 15:23:50 2012 -0700):
8ef17a1b this better effin work
to gerrit.test.com:8081 (y/N)? y
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

----------------------------------------------------------------------
[FAILED] path/gerrit_test/ master (Upload failed)

我已将问题缩小到用于此存储库的用户名,但不知道在哪里设置此用户名(我也不确定如何检查正在使用的用户名)。我尝试在 .repo/manifests.git/config 中添加以下内容,但仍然失败。

[review "gerrit.test.com:8081"]
username = <my_username_from_gerrit_profile_page>

在哪里添加正确的用户名?

谢谢。

最佳答案

确保您在配置文件中有您的用户名。

$ git config --global review.<"URL">.username $USER

关于git - 调试 'repo upload' 问题 - 权限被拒绝(公钥),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11804469/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com