Open daankennes opened 5 months ago
Gerrit uses SSH to connect to the server and do its checkouts. So it's using your device's username (probably Daan
) to connect since that's what SSH defaults to. The Gerrit CLI does not use your git username at all. You'll want to ensure that using ssh {your_gerrit_server_url}
connects succesfully (check out the "SSH Keys" setting in your gerrit settings). After that it should work.
Some tips:
git-review -d {change_number}
in the terminal by itself to test it out. That's a bit easier to debug than viewing the extension's logs..ssh/config
to "rewrite" your username (see here)Thank you! However, I'm afraid I still don't understand entirely. If I use the command ssh -vv -p 29418 xxx.com
, I am succesfully authenticated. If I then for example do git-review -d 5161
, I get the following:
ssh://Daan@xxx.com:29418/repo did not work. Description: Daan@xxx.com: Permission denied (publickey).
Also, I tried rewriting my username but that is seemingly ignored.
How do you normally use Gerrit? Are you able to check out or push patches at all? Maybe good to check out a Gerrit tutorial or getting started guide. I do have some experience setting Gerrit up but this is more of a gerrit-related question than a vscode-gerrit-related question so obviously I'm not as much of an expert :)
Hi,
I just tried configuring this plugin. I can see all changes listed, but when I try to check out a change, the username is capitalized while it should be lowercase entirely. Any pointers on why this is happening? My global .gitconfig looks like this:
... [user] email = daan.kennes@xxx.com name = daan ...
In the log files I see this:
GET request to "https://xxx.com/gerrit/a/changes/I498b470c964a07d57a2fc1323d3371189d29bf74/detail/" Tried to run "git-review -d "I25aa723800470aaf42340968774235af454b02e2"", but failed Stdout: ssh://Daan@xxx.com:29418/labonlineApp did not work. Description: Daan@xxx.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. Could not connect to gerrit. Enter your gerrit username: Stderr: Error: Command failed: git-review -d "I25aa723800470aaf42340968774235af454b02e2"
I know this probably has nothing to do with the plugin, but I'm hoping you could point me in the right direction.
Thank you in advance! Daan