Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable direct push to Gerrit?

Tags:

git

gerrit

While working with Gerrit, the expected push is:

git push origin HEAD:refs/for/branch

But some bad guys seems to do this in a simple way(they learned from some Git manual):

git push origin

or

git push

These operation will cause serious problems:

  • The commit merged directly into master (or some default) branch in remote server.
  • Although the guys write some commit message, but git log can'not find them.
  • Maybe more...

Is there was a way to disable these push operation in Gerrit settings? Or disable it in client?

like image 729
coanor Avatar asked Mar 27 '13 08:03

coanor


Video Answer


1 Answers

There are permissions in the Gerrit admin UI. Permissions are inherited from the All-Projects project. Have a look there (Admin => Project => All-Projects => Access) and remove the push right to anyone on master. More details in the doc here: Access control

like image 69
rcomblen Avatar answered Oct 24 '22 04:10

rcomblen