You can choose who can view your repository.
About repository visibility changes
Members of an enterprise with managed users can only mix the visibility of repositories owned by their personal trương mục to tướng 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 tướng private, GitHub will remove forks that belong to tướng any user without access to tướng the newly private repository. The visibility of any forks will also change to tướng private. For more information, see "What happens to tướng 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 nội dung 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
- Any forks of the repository will remain in the repository network, and GitHub Enterprise Cloud maintains the relationship between the root repository and the fork. For more information, see "What happens to tướng forks when a repository is deleted or changes visibility?"
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 tướng forks when a repository is deleted or changes visibility?"
- If you're converting your private repository to tướng 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 miễn phí 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 tướng 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 tướng GitHub Advanced Security features.
- Actions history and logs will be visible to tướng everyone. If your repository had reusable or required workflows that were shared from a different repository in your organization, the workflow tệp tin path including the repository name will be visible in the logs. For more information on how to tướng remove workflow runs and artifacts see "Managing workflow runs and deployments" and "REST API endpoints for workflow runs."
For information about improving repository security, see "Quickstart for securing your repository."
Consequences of changing a repository's visibility
Caution
Before you change your repository's visibility, understand the consequences of this change.
Changing from public to tướng private
- Stars and watchers for this repository will be permanently erased, which will affect repository rankings.
- Custom Dependabot alert rules will be disabled unless GitHub Advanced Security is enabled for this repository. Dependency graph and Dependabot alerts will remain enabled with permission to tướng perform read-only analysis on this repository.
- Code scanning will become unavailable.
- Current forks will remain public and will be detached from this repository.
Changing from private to tướng public
- The code will be visible to tướng everyone who can visit GitHub.com.
- Anyone can fork your repository.
- All push rulesets will be disabled.
- Your changes will be published as activity.
- Actions history and logs will be visible to tướng everyone.
- Stars and watchers for this repository will be permanently erased.
Changing from private to tướng internal
- All members of the enterprise will be given read access.
- Outside collaborators can no longer be added to tướng forks unless they're added to tướng the root.
- Stars and watchers for this repository will be permanently erased.
Changing from internal to tướng private
- Stars and watchers for this repository will be permanently erased, which will affect repository rankings.
- Custom Dependabot alert rules will be disabled unless GitHub Advanced Security is enabled for this repository. Dependency graph and Dependabot alerts will remain enabled with permission to tướng perform read-only analysis on this repository.
- Code scanning will become unavailable.
- Current forks will remain public and will be detached from this repository.
Changing from internal to tướng public
- The code will be visible to tướng everyone who can visit GitHub.com.
- Anyone can fork your repository.
- All push rulesets will be disabled.
- Your changes will be published as activity.
- Actions history and logs will be visible to tướng everyone.
- Stars and watchers for this repository will be permanently erased.
Changing from public to tướng internal
- All members of the enterprise will be given read access.
- Outside collaborators can no longer be added to tướng forks unless they're added to tướng the root.
- Stars and watchers for this repository will be permanently erased.
Changing a repository's visibility
-
On GitHub, navigate to tướng the main page of the repository.
-
Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown thực đơn, then click Settings.
-
In the "Danger Zone" section, to tướng the right of to tướng "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 tướng change the visibility of.
-
Click I understand, change repository visibility.
Further reading
- "About repositories"