We recommend reviewing the following caveats before you change the visibility of a repository.
- GitHub will detach public forks of the public repository and put them into a new network. Public forks are not made private.
- If you're using GitHub Free for personal accounts or organizations, some features won't be available in the repository after you change the visibility to private. Any published GitHub Pages site will be automatically unpublished. If you added a custom domain to the GitHub Pages site, you should remove or update your DNS records before making the repository private, to avoid the risk of a domain takeover. For more information, see "
GitHub’s plans
" and "
Managing a custom domain for your GitHub Pages site
."
- 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. For more information, see "
About GitHub Advanced Security
."
- GitHub 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.
- Actions history and logs will be visible to everyone. If your repository had reusable or required workflows that were shared from a different repository in your organization, the workflow file path including the repository name will be visible in the logs. For more information on how to remove workflow runs and artifacts see "
Managing workflow runs
" and "
REST API endpoints for workflow runs
".
For information about improving repository security, see "
Quickstart for securing your repository
."
-
On GitHub.com, navigate to the main page of the repository.
-
Under your repository name, click
Settings
. If you cannot see the "Settings" tab, select the
dropdown menu, then click
Settings
.
-
In the "Danger Zone" section, to the right of to "Change repository visibility", click
Change visibility
.
-
Select a visibility.
-
To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of.
-
Click
I understand, change repository visibility
.