[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] Permission denied (publickey).
This is a situation when we use ssh connections to gerrit. But, when you try to push something to master (ignoring code review), it works! How is that possible?You probably have in your gitconfig an ssh URL with your user name. But in your project SCM (in pom.xml) you do not have your user name. What user name maven release plugin use? Your computer account name, which is in most cases different than your Gerrit user name.
How to repair it? Define a file in .ssh/config directory with content:
Host gerrit HostName YOUR_GERRIT_HOST Port YOUR_GERRIT_PORT User YOUR_GERRIT_USER_NAME
There may be a lot of other reason why you have "Premission denied", but this was the hardest I've ever seen.
No comments:
Post a Comment