Skip to main content

Restricting repository creation in your organization

To protect your organization's data, you can configure permissions for creating repositories in your organization.

Setting a blanket policy

You can choose whether members and GitHub Apps can create repositories in your organization. If you allow members and GitHub Apps to create repositories, you can choose which types of repositories they can create. Organization owners can always create any type of repository.

Enterprise owners can restrict the options you have available for your organization's repository creation policy. For more information, see Enforcing repository management policies in your enterprise.

Organization owners can restrict the type of repositories members can create to private or internal to help prevent sensitive information from being exposed. For more information, see Best practices for preventing data leaks in your organization.

Warning

This setting restricts the visibility options available when repositories are created, but does not prevent changing the visibility of existing repositories. For more information about restricting changes to existing repositories' visibilities, see Restricting repository visibility changes in your organization.

  1. In the upper-right corner of GitHub, select your profile photo, then click Your organizations.

  2. Next to the organization, click Settings.

  3. In the "Access" section of the sidebar, click Member privileges.

  4. Under "Repository creation", select one or more options.

    Note

    To restrict members to creating private repositories only, your organization must use GitHub Enterprise Cloud. For more information about how you can try GitHub Enterprise Cloud for free, see Setting up a trial of GitHub Enterprise Cloud.

  5. Click Save.

Setting a more flexible policy (public preview)

You can create a repository policy to govern who can create repositories in your organization, how new repositories must be named, and which visibilities are available. Compared to "member privilege" policies, repository policies give you more flexibility over which users are affected and which repositories are targeted. See Governing how people use repositories in your organization.