Enabling public sites for GitHub Pages
If private mode is enabled on your enterprise, the public cannot access GitHub Pages sites hosted by your enterprise unless you enable public sites.
Warning: If you enable public sites for GitHub Pages, every site in every repository on your enterprise will be accessible to the public.
-
从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击 。
-
如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)。
-
在左侧边栏中,单击 管理控制台。
-
在左侧边栏中,单击 Pages(页面)。
-
Select Public Pages.
-
在左侧边栏下,单击 Save settings(保存设置)。
注意: 管理控制台 中的保存设置将重新启动系统服务,这可能会导致用户可见的停机时间。
-
等待配置运行完毕。
Disabling GitHub Pages for your enterprise
If subdomain isolation is disabled for your enterprise, you should also disable GitHub Pages to protect yourself from potential security vulnerabilities. For more information, see "Enabling subdomain isolation."
-
从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击 。
-
如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)。
-
在左侧边栏中,单击 管理控制台。
-
在左侧边栏中,单击 Pages(页面)。
-
Unselect Enable Pages.
-
在左侧边栏下,单击 Save settings(保存设置)。
注意: 管理控制台 中的保存设置将重新启动系统服务,这可能会导致用户可见的停机时间。
-
等待配置运行完毕。
Configuring GitHub Pages response headers for your enterprise
You can add or override response headers for GitHub Pages sites hosted by 您的 GitHub Enterprise Server 实例.
Warning: Ensure that your response headers are properly configured before saving. Improper configurations may negatively impact the security of 您的 GitHub Enterprise Server 实例.
-
从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击 。
-
如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)。
-
在左侧边栏中,单击 管理控制台。
-
在左侧边栏中,单击 Pages(页面)。
-
Type the headers settings, then click Add headers.
- In the Http Header Name field, type the header name. The length of header name should less than 128 characters.
- In the Http Header Value field, type the header value. The length of header value should less than 300 characters.
-
在左侧边栏下,单击 Save settings(保存设置)。
注意: 管理控制台 中的保存设置将重新启动系统服务,这可能会导致用户可见的停机时间。
-
等待配置运行完毕。