How to create custom namespace under gerrit?

不羁的心 提交于 2019-12-12 03:49:53

问题


I would like to allow developers to freely create/delete branches, push to them, force push etc. But I dont want any developer to delete by accident or force push to master or any Release branch.

From documentation I suspect this can be achived by creating custom namespace, in gerrit documentation you can find:

For example, to grant the possibility to create new branches under the namespace foo, you have to grant this permission onrefs/heads/foo/* for the group that should have it. Finally, if you plan to grant each user a personal namespace in where they are free to create as many branches as they wish, you should grant the create reference permission so it’s possible to create new branches. This is done by using the special ${username} keyword in the reference pattern, e.g. refs/heads/sandbox/${username}/*. If you do, it’s also recommended you grant the users the push force permission to be able to clean up stale branches.

and this is all I want, to allow all developers full rights under refs/heads/dev/* but the question is how do I create dev? And is this a standard aproach?


回答1:


Yes, this is a standard approach.

To create the "dev" branch you can either:

  1. Push to ref/heads/dev

OR

  1. Use the Gerrit UI to create the branch:

    • Click on: Projects > List
    • Select the project
    • Click on: Branches
    • Fill: Branch Name = dev
    • Fill: Initial Revision = some_ref (master, for example)
    • Click on: Create Branch


来源:https://stackoverflow.com/questions/39120868/how-to-create-custom-namespace-under-gerrit

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