【学习GitLab】角色与权限

1 前言

最近在学习 GitLab,将学习成果做个简要总结,以供大家参考。如有错误,欢迎留言纠正!你的「点赞」或「打赏」将是对我最大的支持和鼓励!

本次系列文章包括:

2 权限与角色

在 GitLab 系统中,项目分为私有项目、内部项目和公开项目三种。用户角色又分非项目成员和项目成员,项目成员还分Guest、Reporter、Developer和Maintainer。细分这么多,对理解权限和角色是有点凌乱的。我总结如下:

非项目成员项目成员
没GitLab账号有GitLab账号GuestReporterDeveloperMaintainer
项目可见代码可见仓库权限项目可见代码可见仓库权限项目可见代码可见仓库权限项目可见代码可见仓库权限项目可见代码可见仓库权限项目可见代码可见仓库权限
私有项目××××××××RR
W
+
C
D
R
W
+
C
D
内部项目××××RRR
W
+
C
D
R
W
+
C
D
公开项目××RRR
W
+
C
D
R
W
+
C
D

注意:

  • 项目可见:是指在web上能不能看到该项目,有账号的登录后查看项目列表,没账号的直接在 gitlab.example.com/explore 网址查看,其中 gitlab.example.com 是 gitlab 网址,要根据你自己的情况进行修改。
  • 代码可见:是指在web上能不能看到该项目的代码。
  • 仓库权限:是指git仓库权限,需要特别注意的是,受保护的分支是不允许直接提交的(只能采用merge策略提交),也不允许删除,不允许修改历史。默认情况下 master 分支就是受保护分支。
  • 原则上,公司内部管理,是不允许使用“公开项目”。
  • 只要有GitLab账号,并且能看到项目,用户就能自己申请加入/退出项目。
  • 如果代码不想给“非项目成员”看到,也不让登录的非项目成员看到,可以在「项目 > 设置 > 通用 > 可见性,项目功能,权限 > 仓库」中设置成“仅项目成员”可见。
  • RW+CD的意思,代表具有读写,强制覆盖,创建和删除的权限,如果不想让 Developer 具有覆盖和删除的权限,可以将分支设置为 受保护分支

更多参考:
https://docs.gitlab.com/ce/user/permissions.html
https://www.tutorialspoint.com/gitlab/gitlab_user_permissions.htm

S.N.GuestReporterDeveloperMaster
1Creates a new issueCreates a new issueCreates a new issueCreates a new issue
2Can leave commentsCan leave commentsCan leave commentsCan leave comments
3Able to write on project wallAble to write on project wallAble to write on project wallAble to write on project wall
4-Able to pull project codeAble to pull project codeAble to pull project code
5-Can download projectCan download projectCan download project
6-Able to write code snippetsAble to write code snippetsAble to write code snippets
7--Create new merge requestCreate new merge request
8--Create new branchCreate new branch
9--Push and remove non protected branchesPush and remove non protected branches
10--Includes tagsIncludes tags
11--Can create, edit, delete project milestonesCan create, edit, delete project milestones
12--Can create or update commit statusCan create or update commit status
13--Write a wikiWrite a wiki
14--Create new environmentsCreate new environments
15--Cancel and retry the jobsCancel and retry the jobs
16--Updates and removes the registry imageUpdates and removes the registry image
17---Can add new team members
18---Push and remove protected branches
19---Can edit the project
20---Can manage runners, job triggers and variables
21---Add deploy keys to project
22---Able to manage clusters
23---Configure project hooks
24---Can enable/disable the branch protection
25---Able to rewrite or remove Git tags
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值