Skip to main content

Managing team access to an organization repository

You can give a team access to a repository, remove a team's access to a repository, or change a team's permission level for a repository.

People with admin access to a repository can manage team access to the repository. Team maintainers can remove a team's access to a repository if the team has direct access to it. If the team's access to the repository is inherited from a parent team, maintainers can choose to reset the current permission to match the parent team's permission.

Warnings:

  • You can change a team's permission level if the team has direct access to a repository. If the team's access to the repository is inherited from a parent team, you must change the parent team's access to the repository.
  • If you add or remove repository access for a parent team, each of that parent's child teams will also receive or lose access to the repository. For more information, see "About teams."

Giving a team access to a repository

  1. 在 GitHub AE 的右上角,单击你的个人资料照片,然后单击“你的组织”。 贵组织在配置文件菜单中
  2. 单击您的组织名称。 组织列表中的组织名称
  3. 在组织名称下,单击 “团队”。 “团队”选项卡
  4. 在 Teams(团队)选项卡上,单击团队名称。 组织的团队列表
  5. 在团队成员列表上,单击 “存储库”。 团队存储库选项卡
  6. Above the list of repositories, click Add repository. The Add repository button
  7. Type the name of a repository, then click Add repository to team. Repository search field
  8. Optionally, to the right of the repository name, use the drop-down menu and choose a different permission level for the team. Repository access level dropdown

Removing a team's access to a repository

You can remove a team's access to a repository if the team has direct access to a repository. If a team's access to the repository is inherited from a parent team, you must remove the repository from the parent team in order to remove the repository from child teams.

警告:

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

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

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

  1. 在 GitHub AE 的右上角,单击你的个人资料照片,然后单击“你的组织”。 贵组织在配置文件菜单中
  2. 单击您的组织名称。 组织列表中的组织名称
  3. 在组织名称下,单击 “团队”。 “团队”选项卡
  4. 在 Teams(团队)选项卡上,单击团队名称。 组织的团队列表
  5. 在团队成员列表上,单击 “存储库”。 团队存储库选项卡
  6. Select the repository or repositories you'd like to remove from the team. List of team repositories with the checkboxes for some repositories selected
  7. Above the list of repositories, use the drop-down menu, and click Remove from team. Drop-down menu with the option to remove a repository from a team
  8. Review the repository or repositories that will be removed from the team, then click Remove repositories. Modal box with a list of repositories that the team will no longer have access to

Further reading