I have updated the All Project access permission yesterday, people says that they cannot push changes to repository this morning. After I recovered the access permission, they still cannot push changes to repository, only clone
works fine. While push changes to remote repository, it says that:
![remote rejected] HEAD -> refs/for/master (prohibited by Gerrit)
All our other projects are inherit from All project's access permission, I updated the access permission to the lowest level (i.e. Anonymous can push branch to refs/heads/*
) for test, but I find that the Administrator cannot push changes to the repository too!
Is there any other settings need to add?
For new users it often happens that they accidentally try to bypass code review. The push then fails with the error message 'prohibited by Gerrit' because the project didn’t allow to bypass code review.
For new users it often happens that they accidentally try to bypass code review. The push then fails with the error message 'prohibited by Gerrit' because the project didn’t allow to bypass code review. Bypassing the code review is done by pushing directly to refs/heads/* (e. g. refs/heads/master) instead of pushing to refs/for/*
prohibited by Gerrit This is a general error message that is returned by Gerrit if a push is not allowed, e.g. because the pushing user has no sufficient privileges. In particular this error occurs: if you push a commit for code review to a branch for which you don’t have upload permissions (access right 'Push' on refs/for/refs/heads/*)
Gerrit follows the standard Git workflow pattern, in that you use the git push command to copy your files from your local machine to the remote repository. However, instead of your changes going directly into the repository, they go into a specific namespace.
To push to the review branches (i. e. refs/for/*
), you have to set the permission "Push" for the reference refs/for/refs/*
. You then also need the permission Label Code Review
, Label verified
and Submit
for the reference refs/heads/*
to do the actual code review.
If you don't want code review, but push directly to the branch, then your permissions are correct, but then you also have to push to refs/heads/master
, and not refs/for/master
.
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