How to disable direct push to Gerrit?

白昼怎懂夜的黑 提交于 2020-01-01 10:56:07

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/15654184/how-to-disable-direct-push-to-gerrit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!