Skip to main content

Setting repository visibility

You can choose who can view your repository.

About repository visibility changes

Note: If you can't change a repository's visibility, the organization owner may have restricted the ability to change repository visibility to organization owners only. For more information, see "Restricting repository visibility changes in your organization."

Members of an enterprise with managed users can only set the visibility of repositories owned by their personal account to private, and repositories in their enterprise's organizations can only be private or internal. For more information, see "About Enterprise Managed Users."

We recommend reviewing the following caveats before you change the visibility of a repository.

Making a repository private

  • GitHub Enterprise Cloud will detach public forks of the public repository and put them into a new network. Public forks are not made private.
  • If you change a repository's visibility from internal to private, GitHub will remove forks that belong to any user without access to the newly private repository. The visibility of any forks will also change to private. For more information, see "What happens to forks when a repository is deleted or changes visibility?"
  • GitHub will no longer include the repository in the GitHub Archive Program. For more information, see "About archiving content and data on GitHub."
  • GitHub Advanced Security features, such as code scanning, will stop working unless the repository is owned by an organization that is part of an enterprise with a license for Advanced Security and sufficient spare seats. For more information, see "About GitHub Advanced Security."

Making a repository internal

Making a repository public

  • GitHub Enterprise Cloud will detach private forks and turn them into a standalone private repository. For more information, see "What happens to forks when a repository is deleted or changes visibility?"
  • If you're converting your private repository to a public repository as part of a move toward creating an open source project, see the Open Source Guides for helpful tips and guidelines. You can also take a free course on managing an open source project with GitHub Skills. Once your repository is public, you can also view your repository's community profile to see whether your project meets best practices for supporting contributors. For more information, see "About community profiles for public repositories."
  • The repository will automatically gain access to GitHub Advanced Security features.

For information about improving repository security, see "Securing your repository."

Changing a repository's visibility

  1. On GitHub.com, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Danger Zone" section, to the right of to "Change repository visibility", click Change visibility.

  4. Select a visibility.

  5. To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of.

  6. Click I understand, change repository visibility.

Further reading