Unable to push my changes to gerrit


I am trying to submit my first patch. When I try to push my changes I am facing this error:

syedsouban@git.haiku-os.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

PS: I have logged in on gerrit and also added my ssh keys from my github account.


You’re attempting to push the code directly into our repository here.
Please use git review to make a code review request.


In addition make sure you add your SSH keys to ssh-agent. I was having problems with that when trying to even pull from Gerrit.



I am using this command to push:

git push origin master:refs/for/master

What is the syntax of git review?


I followed that link and added ssh keys to github and gerrit both. I am still facing the same error!


Facing the same error. I followed the instructions at CodingGuidelines/SubmittingPatches, and added my SSH key.

Should I use my github username, or the username in this forum?


You need to use your Gerrit username. It is listed at https://review.haiku-os.org/settings/

Please show us the output of “git remote -v” so we can see how you have set up your repositories. It should look like this:

origin ssh://pulkomandy@git.haiku-os.org/haiku (fetch)
origin ssh://pulkomandy@git.haiku-os.org/haiku (push)


OK, I am using the right username. The output of git remote -v is

origin  https://review.haiku-os.org/haiku (fetch)
origin  https://review.haiku-os.org/haiku (push)

Maybe https does not allow push?


For http you would need to set up a password in Gerrit settings. I recommend switching to ssh, so you don’t need to type a password everytime you want to push something.


It works, thanks.


Output of git remote -v is:

origin ssh://syedsouban@git.haiku-os.org/haiku (fetch)
origin ssh://syedsouban@git.haiku-os.org/haiku (push)