About policies for repository management in your enterprise
You can enforce policies to control how members of your enterprise on GitHub Enterprise Cloud manage repositories. You can also allow organization owners to manage policies for repository management. For more information, see "Creating and managing repositories and "Organizations and teams."
Enforcing a policy for base repository permissions
Across all organizations owned by your enterprise, you can set a base repository permission level (none, read, write, or admin) for organization members, or allow owners to administer the setting on the organization level.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Base permissions", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Base permissions", use the drop-down menu and choose a policy.
Enforcing a policy for repository creation
Across all organizations owned by your enterprise, you can allow members to create repositories, restrict repository creation to organization owners, or allow owners to administer the setting on the organization level. If you allow members to create repositories, you can choose whether members can create any combination of public, private, and internal repositories. Internal repositories are the default setting for all new repositories created in an organization owned by an enterprise account. For more information about internal repositories, see "Creating an internal repository."
Organization owners can always create any type of repository, and outside collaborators can never create any type of repository. For more information, see "About repositories."
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Repository creation", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository creation", select a policy.
-
If you selected Members can create repositories, select one or more repository types.
Enforcing a policy for forking private or internal repositories
Across all organizations owned by your enterprise, you can allow people with access to a private or internal repository to fork the repository, never allow forking of private or internal repositories, or allow owners to administer the setting on the organization level.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Repository forking", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository forking", use the drop-down menu and choose a policy.
-
If forking is enabled, you can specify where users are allowed to fork repositories. Review the information about changing the setting and choose a policy.
Enforcing a policy for inviting outside collaborators to repositories
Across all organizations owned by your enterprise, you can allow members to invite outside collaborators to repositories, restrict outside collaborator invitations to organization owners, restrict outside collaborator invitations to enterprise owners, or allow organization owners to administer the setting on the organization level.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Repository outside collaborators", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository outside collaborators", use the drop-down menu and choose a policy.
Enforcing a policy for the default branch name
Across all organizations owned by your enterprise, you can set the default branch name for any new repositories that members create. You can choose to enforce that default branch name across all organizations or allow individual organizations to set a different one.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
On the Repository policies tab, under "Default branch name", enter the default branch name that new repositories should use.
-
Optionally, to enforce the default branch name for all organizations in the enterprise, select Enforce across this enterprise.
-
Click Update.
Enforcing a policy for changes to repository visibility
Across all organizations owned by your enterprise, you can allow members with admin access to change a repository's visibility, restrict repository visibility changes to organization owners, or allow owners to administer the setting on the organization level. When you prevent members from changing repository visibility, only enterprise owners can change the visibility of a repository.
If an enterprise owner has restricted repository creation to organization owners only, then members will not be able to change repository visibility. If an enterprise owner has restricted member repository creation to private repositories only, then members will only be able to change the visibility of a repository to private. For more information, see "Setting a policy for repository creation."
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Repository visibility change", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository visibility change", use the drop-down menu and choose a policy.
Enforcing a policy for repository deletion and transfer
Across all organizations owned by your enterprise, you can allow members with admin permissions to delete or transfer a repository, restrict repository deletion and transfers to organization owners, or allow owners to administer the setting on the organization level.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
Under " Policies", click Repositories.
-
Under "Repository deletion and transfer", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository deletion and transfer", use the drop-down menu and choose a policy.
Enforcing a policy for deleting issues
Across all organizations owned by your enterprise, you can allow members with admin access to delete issues in a repository, restrict issue deletion to organization owners, or allow owners to administer the setting on the organization level.
-
In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.
-
In the list of enterprises, click the enterprise you want to view.
-
In the enterprise sidebar, click Policies.
-
On the Repository policies tab, under "Repository issue deletion", review the information about changing the setting. Optionally, to view the current configuration for all organizations in the enterprise account before you change the setting, click View your organizations' current configurations.
-
Under "Repository issue deletion", use the drop-down menu and choose a policy.