Enforcing repository management policies in your enterprise account

Enterprise owners can enforce certain repository management policies for all organizations owned by an enterprise account, or allow policies to be set in each organization.

Enterprise accounts are available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "About enterprise accounts."

For more information, see "Repository permission levels for an organization."

Enforcing a policy on base repository permissions

Across all organizations owned by your enterprise account, 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.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, 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. Link to view the current policy configuration for organizations in the business

  5. Under "Base permissions", use the drop-down menu and choose a policy. Drop-down menu with repository permissions policy options

Enforcing a policy on creating repositories

Across all organizations owned by your enterprise account, 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."

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository creation", select a policy. Drop-down menu with repository creation policy options

  6. If you selected Members can create repositories, select one or more repository types. Checkboxes for repository types

  7. Click Save.

Enforcing a policy on forking private or internal repositories

Across all organizations owned by your enterprise account, 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.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository forking", use the drop-down menu and choose a policy. Drop-down menu with repository forking policy options

Enforcing a policy on inviting outside collaborators to repositories

Across all organizations owned by your enterprise account, you can allow members to invite outside collaborators to repositories, restrict outside collaborator invitations to organization owners, or allow owners to administer the setting on the organization level.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, under "Repository invitations", 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository invitations", use the drop-down menu and choose a policy. Drop-down menu with outside collaborator invitation policy options

Enforcing a policy on changing repository visibility

Across all organizations owned by your enterprise account, you can allow members with admin permissions to change a repository's visibility, restrict repository visibility changes to organization owners, or allow owners to administer the setting on the organization level.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository visibility change", use the drop-down menu and choose a policy. Drop-down menu with repository visibility policy options

Enforcing a policy on deleting or transferring repositories

Across all organizations owned by your enterprise account, 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.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository deletion and transfer", use the drop-down menu and choose a policy. Drop-down menu with repository deletion policy options

Enforcing a policy on deleting issues

Across all organizations owned by your enterprise account, you can allow members with admin permissions to delete issues in a repository, restrict issue deletion to organization owners, or allow owners to administer the setting on the organization level.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. 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. Link to view the current policy configuration for organizations in the business

  5. Under "Repository issue deletion", use the drop-down menu and choose a policy. Drop-down menu with issue deletion policy options

Enforcing a policy on the default branch name

Across all organizations owned by your enterprise account, 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.

  1. In the top-right corner of GitHub, click your profile photo, then click Your enterprises. "Your enterprises" in drop-down menu for profile photo on GitHub

  2. In the list of enterprises, click the enterprise you want to view. Name of an enterprise in list of your enterprises

  3. In the enterprise sidebar, click Policies. Policies tab in the enterprise account sidebar

  4. On the Repository policies tab, under "Default branch name", enter the default branch name that new repositories should use. Text box for entering default branch name

  5. Optionally, to enforce the default branch name for all organizations in the enterprise, select Enforce across this enterprise. Enforcement checkbox

  6. Click Update. Update button

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.