Setting repository visibility - GitHub Docs

  • 17,000
  • Tác giả: admin
  • Ngày đăng:
  • Lượt xem: 17
  • Tình trạng: Còn hàng

You can choose who can view your repository.

About repository visibility changes

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

Making a repository private

  • 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 tát private. Any published GitHub Pages site will be automatically unpublished. If you added a custom tên miền to tát the GitHub Pages site, you should remove or update your DNS records before making the repository private, to tát avoid the risk of a tên miền takeover. For more information, see GitHub’s plans and Managing a custom tên miền for your GitHub Pages site.
  • 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. For more information, see "About GitHub Advanced Security."

Making a repository public

  • GitHub will detach private forks and turn them into a standalone private repository. For more information, see What happens to tát forks when a repository is deleted or changes visibility?
  • If you're converting your private repository to tát 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 không lấy 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át 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át GitHub Advanced Security features.
  • Actions history and logs will be visible to tát 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át 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át 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át 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át public

  • The code will be visible to tát 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át everyone.
  • Stars and watchers for this repository will be permanently erased.

Changing from private to tát internal

  • All members of the enterprise will be given read access.
  • Outside collaborators can no longer be added to tát forks unless they're added to tát the root.
  • Stars and watchers for this repository will be permanently erased.

Changing from internal to tát 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át 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át public

  • The code will be visible to tát 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át everyone.
  • Stars and watchers for this repository will be permanently erased.

Changing from public to tát internal

  • All members of the enterprise will be given read access.
  • Outside collaborators can no longer be added to tát forks unless they're added to tát the root.
  • Stars and watchers for this repository will be permanently erased.

Changing a repository's visibility

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

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown thực đơn, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.
  3. In the "Danger Zone" section, to tát the right of to tát "Change repository visibility", click Change visibility.

  4. Select a visibility.

  5. To verify that you're changing the correct repository's visibility, type the name of the repository you want to tát change the visibility of.

  6. Click I understand, change repository visibility.

Further reading

  • About repositories