I'm moving a GitHub project to Gerrit. I'm doing the following:
Making a new project in Gerrit with no initial commit set
Cloning the repo from GitHub onto my local machine.
cd-ing into the repo directory on my machine
Removing the GitHub remote (git remote remove origin)
Adding the Gerrit remote (git remote add origin ssh://git.
Making sure I've got Push rights on refs/* in the target repository in Gerrit
Run git push origin master
I get the following error on running step 7: ! [remote rejected] master -> master (prohibited by Gerrit: update for creating new commit object not permitted)
I've confirmed that my push/fetch remote are in fact the Gerrit repository I want to push to. Furthermore, I've verified that I can make commits to this repository outside of my GitHub repo (e.g., I can submit a commit containing just an empty .txt file for review).
One other note: I didn't used to have this problem, but have been having it since upgrading Gerrit to 2.16.2
When you execute "git push origin master" you're trying to push straight to branch bypassing the code review on Gerrit (this is the usual push to review command: git push origin HEAD:refs/for/master"). The "master -> master (prohibited by Gerrit)" means you don't have permission to perform this push.
See more info about this error in Gerrit documentation here.
Note: this is a permission issue and it's not directly related to the upgrade to Gerrit 2.16.2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With