This version of GitHub Enterprise was discontinued on 2021-09-23. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Setting repository visibility

You can choose who can view your repository.

About repository visibility changes

Organization owners can restrict the ability to change repository visibility to organization owners only. For more information, see "Restricting repository visibility changes in your organization."

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

Warning: Changes to the visibility of a large repository or repository network may affect data integrity. Visibility changes can also have unintended effects on forks. GitHub recommends the following before changing the visibility of a repository network.

  • Wait for a period of reduced activity on your GitHub Enterprise Server instance.

  • Contact your site administrator before proceeding. Your site administrator can contact GitHub Enterprise Support or GitHub Premium Support for further guidance.

Making a repository private

  • GitHub Enterprise Server 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?"
  • Any published GitHub Pages site will be automatically unpublished.
  • Anonymous Git read access is no longer available. For more information, see "Enabling anonymous Git read access for a repository."

Making a repository internal

Note: Internal repositories are available on GitHub Enterprise Cloud for organizations that are owned by an enterprise account and GitHub Enterprise Server 2.20+. For more information, see "GitHub's products" and "About enterprise accounts."

Making a repository public

Changing a repository's visibility

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. Under your repository name, click Settings. Repository settings button

  3. Under "Danger Zone", to the right of to "Change repository visibility", click Change visibility. Change visibility button

  4. Select a visibility.

    Dialog of options for repository 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.

    Confirm change of repository visibility button

Further reading