Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Setting repository visibility

You can choose who can view your repository.

About repository visibility changes

Organization owners can restrict the ability to change repository visibility to organization owners only. For more information, see "Restricting repository visibility changes in your organization."

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

Warning: Changes to the visibility of a large repository or repository network may affect data integrity. Visibility changes can also have unintended effects on forks. GitHub recommends the following before changing the visibility of a repository network.

  • Wait for a period of reduced activity on your GitHub Enterprise Server instance.

  • Contact your site administrator before proceeding. Your site administrator can contact GitHub Enterprise 支持 for further guidance.

Making a repository private

Making a repository internal

Making a repository public

Changing a repository's visibility

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

  2. 在存储库名称下,单击 “设置”。 “存储库设置”按钮

  3. Under "Danger Zone", to the right of to "Change repository visibility", click Change visibility. Change visibility button

  4. Select a visibility.

    Dialog of options for repository visibility

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

  6. Click I understand, change repository visibility.

    Confirm change of repository visibility button

Further reading