Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-07-09. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

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

You can give a team access to a repository or change a team's level of access to a repository in your repository settings. For more information, see "Managing teams and people with access to your repository."

Removing a team's access to a repository

You can remove a team's access to an organization repository in your repository settings. For more information, see "Managing teams and people with access to your repository."

If a team has direct access to a repository, you can remove that team's access to the 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.

Warning:

  • If you remove a person’s access to a private repository, any of their forks of that private repository are deleted. Local clones of the private repository are retained. If a team's access to a private repository is revoked or a team with access to a private repository is deleted, and team members do not have access to the repository through another team, private forks of the repository will be deleted.

  • When LDAP Sync is enabled, if you remove a person from a repository, they will lose access but their forks will not be deleted. If the person is added to a team with access to the original organization repository within three months, their access to the forks will be automatically restored on the next sync.

  • You are responsible for ensuring that people who have lost access to a repository delete any confidential information or intellectual property.

  • People with admin permissions to a private or internal repository can disallow forking of that repository, and organization owners can disallow forking of any private or internal repository in an organization. For more information, see "Managing the forking policy for your organization" and "Managing the forking policy for your repository."

Further reading