git 如何授予用户级访问私有 GitLab 存储库的权限?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31908222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:27:20  来源:igfitidea点击:

How to give user level access to private GitLab repository?

gitgitlab

提问by VeLKerr

I have a private repository in GitLab. I have to give its access to members of my team. How can I do that using GitLab web-interface?

我在GitLab 中有一个私有存储库。我必须将其访问权限授予我的团队成员。我怎样才能使用 GitLab 网络界面做到这一点?

I know, how to do this in GitHub, but in GitLab it's somehow different.

我知道,如何在 GitHub 中做到这一点,但在 GitLab 中却有所不同。

回答by Aleksandar

UPDATE:Gitlab has changed a bit in 2 years, so here is the updated flow.

更新:Gitlab 在 2 年内发生了一些变化,所以这里是更新的流程。

  1. Click on the projectthat you want to share.
  2. Click on the Settingstab (the gear icon on the left).
  3. Click on the Memberssubtab.
  4. Add member, and find the user if it exists on GitLab, or insert email to send an invitation.
  5. Select access level for the user, the possible levels are:
    • Guest, can see wiki pages, view and create issues.
    • Reporter, can do what the guest can plus view the code.
    • Developer, normal developer access, can develop, but cannot push or merge to procted branches by default.
    • Maintainer, can do everything except managing the project.
  6. For more info about the user access level refer to gitlab official help.
  7. (Optional)Set expiration date of the user access.
  1. 单击要共享的项目
  2. 单击“设置”选项卡(左侧的齿轮图标)。
  3. 单击成员子选项卡。
  4. 添加成员,并在GitLab上找到该用户,或者插入电子邮件发送邀请。
  5. 为用户选择访问级别,可能的级别有:
    • 来宾,可以查看 wiki 页面、查看和创建问题。
    • 记者,可以做什么客人可以加查看代码。
    • 开发者,普通开发者权限,可以开发,但默认不能push或merge到procted分支。
    • 维护者,除了管理项目之外可以做任何事情。
  6. 有关用户访问级别的更多信息,请参阅gitlab 官方帮助
  7. (可选)设置用户访问的到期日期。


Old instructions:

旧指令:

  1. Click on the projectthat you want to share.
  2. Click on members.
  3. Add member, and find the user if it exists on GitLab, or insert email to send an invitation.
  1. 单击要共享的项目
  2. 点击会员
  3. 添加成员,并在GitLab上找到该用户,或者插入电子邮件发送邀请。

回答by Dana

The prior answer has a problem. The (poor) Gitlab UI does not have a "members" option to click on after clicking on the project.

前面的回答有问题。(糟糕的)Gitlab UI 在点击项目后没有“成员”选项可以点击。

You first must click on the gear icon at the upper right to reveal the members option.

您首先必须单击右上角的齿轮图标以显示成员选项。

回答by Maz341

2019 Updated Answer

2019 更新答案

  1. Open Project (Click on project's name to open it)
  2. On the left side bar the last option is Settings open it.
  3. Click on members
  4. Under invite member'sTab there is an option "GitLab member or Email address" Enter the username of the person you want to add.
  5. Choose a role from (Guest, Maintainer, Developer, Reporter)
  6. Add to project.
  1. 打开项目(点击项目名称打开)
  2. 在左侧栏的最后一个选项是设置打开它。
  3. 点击会员
  4. 邀请成员的选项卡下有一个选项“GitLab 成员或电子邮件地址”输入您要添加的人的用户名。
  5. 从(访客、维护者、开发者、报告者)中选择一个角色
  6. 添加到项目。