Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-09-28. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Managing an individual's access to an organization repository

You can manage a person's access to a repository owned by your organization.

Who can use this feature

People with admin access to a repository can manage access to the repository.

About access to organization repositories

When you remove a collaborator from a repository in your organization, the collaborator loses read and write access to the repository. If the repository is private and the collaborator has forked the repository, then their fork is also deleted, but the collaborator will still retain any local clones of your repository.

警告:

  • 如果您删除某人访问私有仓库的权限,则其对该私有仓库的任何复刻也会被删除。 将保留私人仓库的本地克隆。 如果撤销团队对专用存储库的访问权限,或者删除对专用存储库具有访问权限的团队,并且团队成员无法通过另一个团队访问存储库,则该存储库的专用分支将被删除。

  • 启用 LDAP 同步后,如果从存储库删除某用户,用户将失去访问权限,但其分支将不会删除。 如果此用户在三个月内被加入具有原组织仓库访问权限的团队,则其对复刻的访问权限将在下次同步时自动恢复。

  • 您负责确保无法访问仓库的人员删除任何机密信息或知识产权。

  • 对专用或内部存储库拥有管理员权限的人可以禁止分叉该存储库,组织所有者可以禁止分叉组织中任何专用或内部存储库。 有关详细信息,请参阅“管理组织的分叉策略”和“管理存储库的分叉策略”。

Giving a person access to a repository

  1. 在 your GitHub Enterprise Server instance 上,导航到存储库的主页。
  2. 在存储库名称下,单击 “设置”。 “存储库设置”按钮
  3. 在左侧边栏中,单击“管理访问权限。 管理访问权限”选项卡
  4. 在“管理访问”右侧,单击“添加人员”或“添加团队” 。 “邀请团队或人员”按钮
  5. In the search field, start typing the name of the person to invite, then click a name in the list of matches. Search field for typing the name of a team or person to invite to the repository
  6. Under "Choose a role", select the repository role to assign the person, then click Add NAME to REPOSITORY. Selecting permissions for the team or person

Managing an individual's access to an organization repository

  1. 在 GitHub Enterprise Server 的右上角,单击你的个人资料照片,然后单击“你的组织”。 贵组织在配置文件菜单中
  2. 单击您的组织名称。 组织列表中的组织名称
  3. 在你的组织名称下,单击 “人员”。 “人员”选项卡
  4. Click either Members or Outside collaborators to manage people with different types of access. Button to invite members or outside collaborators to an organization
  5. To the right of the name of the person you'd like to manage, use the drop-down menu, and click Manage. The manage access link
  6. On the "Manage access" page, next to the repository, click Manage access. Manage access button for a repository
  7. Review the person's access to a given repository, such as whether they're a collaborator or have access to the repository via team membership. Repository access matrix for the user

Further reading