git 协作者是否拥有 GitHub 上的提交访问权限?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5010754/
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-10 10:06:59  来源:igfitidea点击:

Do collaborators have commit access on GitHub?

gitgithub

提问by Brettski

One thing I noticed: Using the GitHub UI, I added a collaborator to a repository. I saw that they committed changes without any authority / approval from me. It was a private repository.

我注意到的一件事:使用 GitHub UI,我向存储库添加了一个协作者。我看到他们在没有我的任何授权/批准的情况下进行了更改。这是一个私人存储库。

With private repositories, how do I give someone read access versus write access?

使用私有存储库,我如何授予某人读访问权与写访问权?

回答by Simone Carletti

With private repositories, how do I give someone read access versus write access?

使用私有存储库,我如何授予某人读访问权与写访问权?

This kind of permission is not available for simple accounts. When you add an user as a collaborator, he gains read/write permissions.

此类权限不适用于简单帐户。当您将用户添加为协作者时,他将获得读/写权限。

The story changes if you own an Organization. Organizations contains teams and each team can have different level of access, including read-only. You can assign users to a specific read-only group, and they will only have pull access to the repositories.

如果您拥有一个组织,情况就会改变。组织包含团队,每个团队可以拥有不同级别的访问权限,包括只读。您可以将用户分配到特定的只读组,并且他们只能对存储库进行拉取访问。

回答by mipadi

Private repositories in an ordinary user account are an all-or-nothing deal: either someone has full read/write access (i.e., they're a collaborator) or they have no access. However, if you set up an organization, create the repo under the aegis of the organization, and then add the collaborator, you have much more fine-grained control (including giving read-only access to a private repo).

普通用户帐户中的私有存储库是一个要么全有要么全无的交易:要么某人拥有完全的读/写访问权限(即,他们是合作者),要么他们没有访问权限。但是,如果您建立一个组织,在该组织的支持下创建存储库,然后添加协作者,您将拥有更细粒度的控制(包括授予对私有存储库的只读访问权限)。