问题描述
在使用Gerrit时,预期的 push
是: git push origin HEAD:refs / for / branch
但是有些坏人似乎是在简单(他们从一些Git手册中了解到):
git push origin
或
git push
这些操作会导致严重问题:
git log
can not not find them。
在Gerrit设置中禁用这些 push
操作的方法?或在客户端禁用它?
All-Projects
项目继承的。看看那里(管理员=>项目=>所有项目=>访问),并删除推到主人的权利。有关此文档中的更多详细信息,请访问: 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?
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
这篇关于如何禁用直接推送到Gerrit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!