文章版本: GitHub.com
Unpublishing a GitHub Pages site
You can unpublish your GitHub Pages site so that the site is no longer available to the public.
GitHub Pages 适用于具有 GitHub Free 和组织的 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。 更多信息请参阅“GitHub 的产品”。
本文内容
Were you able to find what you were looking for?
Thank you! Your feedback has been submitted.
People with admin permissions for a repository can unpublish a GitHub Pages site.
Unpublishing a project site
- 在 GitHub 上,导航到仓库的主页面。
- If a
gh-pagesbranch exists in the repository, delete thegh-pagesbranch. - If the
gh-pagesbranch was your publishing source, skip to step 6. - 在仓库名称下,单击 Settings(设置)。

- Under "GitHub Pages", use the Source drop-down menu and select None.

- 如果为站点启用了自定义域,为避免域名被占用,请更新您的 DNS 设置。 更多信息请参阅“为 GitHub Pages 站点配置自定义域”。
Unpublishing a user or organization site
- 在 GitHub 上,导航到仓库的主页面。
- Delete the
masterbranch, or delete the entire repository. For more information, see "Creating and deleting branches within your repository" and "Deleting a repository." - 如果为站点启用了自定义域,为避免域名被占用,请更新您的 DNS 设置。 更多信息请参阅“为 GitHub Pages 站点配置自定义域”。
延伸阅读
Were you able to find what you were looking for?
Thank you! Your feedback has been submitted.