Organization owners and team maintainers can add repositories to a team, as well as change the team's read, write, and admin access to the repository.

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. Profile photoIn the top right corner of GitHub Enterprise, click your profile photo, then click Your profile.

  2. organization iconsOn the left side of your profile page, under "Organizations", click the icon for your organization.

  3. Teams tabUnder your organization name, click Teams.

  4. List of the organization's teamsOn the Teams tab, click the name of the team.

  5. The team repositories tabAbove the list of team members, click Repositories.

  6. The Add repository buttonAbove the list of repositories, click Add repository.

  7. Repository search fieldIn the "Search by repository name" field, type the name of a repository, then select it.
  8. Repository access level dropdownOptionally, to the right of the repository name, choose a different permission level for the team.

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.

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.
  1. Profile photoIn the top right corner of GitHub Enterprise, click your profile photo, then click Your profile.

  2. organization iconsOn the left side of your profile page, under "Organizations", click the icon for your organization.

  3. Teams tabUnder your organization name, click Teams.

  4. List of the organization's teamsOn the Teams tab, click the name of the team.

  5. The team repositories tabAbove the list of team members, click Repositories.

  6. List of team repositories with the checkboxes for some repositories selectedSelect the repository or repositories you'd like to remove from the team.

  7. Drop-down menu with the option to remove a repository from a teamAbove the list of repositories, use the drop-down menu, and click Remove from team.
  8. Modal box with a list of repositories that the team will no longer have access toReview the repository or repositories that will be removed from the team, then click Remove repositories.