coanor coanor - 1 year ago 199
Git Question

Gerrit push to refs/for/master prohibited

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

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
) for test, but I find that the Administrator cannot push changes to the repository too!

Is there any other settings need to add?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download