如何禁用直接推送到Gerrit? [英] How to disable direct push to Gerrit?

查看:410
本文介绍了如何禁用直接推送到Gerrit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Gerrit时,预期的 push 是:

  git push origin HEAD:refs / for / branch 

但是有些坏人似乎是在简单(他们从一些Git手册中了解到):

  git push origin 

  git push 

这些操作会导致严重问题:


  • 提交直接合并到远程服务器的master(或某个默认)分支中。
  • 虽然这些人写了一些提交消息,但是 git log can not not find them。

  • 也许更多...



在Gerrit设置中禁用这些 push 操作的方法?或在客户端禁用它?

解决方案

Gerrit管理界面有权限。权限是从 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆