Article version: Enterprise Server 2.15

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-10-16. 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.

In this guide

About repository visibility

When creating a repository, you can choose to make it public or private. Public repositories are accessible to everyone using your GitHub Enterprise Server instance, while private repositories are accessible to you and the people you share them with. If your GitHub Enterprise Server instance is not in private mode or behind a firewall, public repositories are visible to the public.

Repository owners, people with admin permissions for an organization-owned repository, and organization owners can change a repository's visibility.

For organization-owned repositories, if an organization owner has restricted the ability to change repository visibility to organization owners only, people with admin permissions to a public repository cannot make it private.

Making a repository private

If a public repository that has anonymous Git read access is made private, then the anonymous Git access is revoked. For more information, see "Enabling anonymous Git read access for a repository."

Warning: When a public repository is made private, public forks of the public repository are detached and put into a new network. Public forks are not made private. For more information, see "What happens to forks when a repository is deleted or changes visibility?"

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

  2. Under your repository name, click Settings.

    Repository settings button

  3. Under "Danger Zone", next to "Make this repository private", click Make private.

    Make private button

  4. Read the warnings about making a repository private.

    Warnings popup

  5. Type the name of the repository that you want to make private, for example accountname/reponame.

  6. Click I understand, make this repository private.

Making a repository public

Warning: When a private repository is made public, its private forks are detached. For more information, see "What happens to forks when a repository is deleted or changes visibility?"

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

  2. Under your repository name, click Settings.

    Repository settings button

  3. Under "Danger Zone", next to "Make this repository public", click Make public.

    Make public button

  4. Read the warnings about making a repository public.

    Pop-up with information about making a private repository public

  5. Type the name of the repository that you want to make public, for example accountname/reponame.

  6. Click I understand, make this repository public.

Resources for creating an open source project

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.

Ask a human

Can't find what you're looking for?

Contact us