You can change a repository's visibility from public to private if you're an organization owner or have admin permissions for the repository.
Warning: When a public repository is made private, public forks of the public repository are detached and put into a new network. They are not made private. For more information, see "What happens to forks when a repository is deleted or changes visibility?"
On GitHub Enterprise, navigate to the main page of the repository.
Under your repository name, click Settings.
Click Make private.
- Read the warnings.
- Type the name of the repository that you want to make private.
- Click I understand, make this repository private.