1
0
mirror of synced 2025-12-23 11:54:18 -05:00

[Jan 21] Access control for GitHub Pages (#16904)

This commit is contained in:
Laura Coursen
2021-01-21 12:57:30 -06:00
committed by GitHub
parent d9f0360cd5
commit 7ca9769bf8
23 changed files with 112 additions and 53 deletions

View File

@@ -24,10 +24,14 @@ versions:
You can host your site on {% data variables.product.prodname_dotcom %}'s `github.io` domain or your own custom domain. For more information, see "[Using a custom domain with {% data variables.product.prodname_pages %}](/articles/using-a-custom-domain-with-github-pages)."
{% endif %}
{% if currentVersion == "free-pro-team@latest" %}
{% data reusables.pages.about-private-publishing %} For more information, see "[Changing the visibility of your {% data variables.product.prodname_pages %} site](/github/working-with-github-pages/changing-the-visibility-of-your-github-pages-site)."
{% endif %}
To get started, see "[Creating a {% data variables.product.prodname_pages %} site](/articles/creating-a-github-pages-site)."
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}
Organization owners can disable the publication of {% data variables.product.prodname_pages %} sites from the organization's repositories. For more information, see "[Disabling publication of {% data variables.product.prodname_pages %} sites for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-publication-of-github-pages-sites-for-your-organization)."
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}
Organization owners can disable the publication of {% data variables.product.prodname_pages %} sites from the organization's repositories. For more information, see "[Managing the publication of {% data variables.product.prodname_pages %} sites for your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-publication-of-github-pages-sites-for-your-organization)."
{% endif %}
### Types of {% data variables.product.prodname_pages %} sites
@@ -38,6 +42,10 @@ To publish a user site, you must create a repository owned by your user account
The source files for a project site are stored in the same repository as their project. {% if currentVersion == "free-pro-team@latest" %}Unless you're using a custom domain, project sites are available at `http(s)://<username>.github.io/<repository>` or `http(s)://<organization>.github.io/<repository>`.{% elsif currentVersion == "github-ae@latest" %}Project sites are available at `http(s)://pages.<hostname>/<username>/<repository>/` or `http(s)://pages.<hostname>/<organization>/<repository>/`.{% endif %}
{% if currentVersion == "free-pro-team@latest" %}
If you publish your site privately, the URL for your site will be different. For more information, see "[Changing the visibility of your {% data variables.product.prodname_pages %} site](/github/working-with-github-pages/changing-the-visibility-of-your-github-pages-site)."
{% endif %}
{% if currentVersion == "free-pro-team@latest" %}
For more information about how custom domains affect the URL for your site, see "[About custom domains and {% data variables.product.prodname_pages %}](/articles/about-custom-domains-and-github-pages)."
{% endif %}
@@ -87,9 +95,9 @@ The default publishing source for a project site is the `gh-pages` branch. If th
Project sites can also be published from the `master` branch or a `/docs` folder on the `master` branch. To publish your site from one of these sources, you must configure a different publishing source. For more information, see "[Configuring a publishing source for your {% data variables.product.prodname_pages %} site](/articles/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source)."
If you choose the `/docs` folder of the `master` branch as your publishing source, {% data variables.product.prodname_pages %} will read everything to publish your site{% if currentVersion == "free-pro-team@latest" %}, including the _CNAME_ file,{% endif %} from the `/docs` folder.{% if currentVersion == "free-pro-team@latest" %} For example, when you edit your custom domain through the {% data variables.product.prodname_pages %} settings, the custom domain will write to `/docs/CNAME`. For more information about _CNAME_ files, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)."{% endif %}
If you choose the `/docs` folder of the `master` branch as your publishing source, {% data variables.product.prodname_pages %} will read everything to publish your site{% if currentVersion == "free-pro-team@latest" %}, including the _CNAME_ file,{% endif %} from the `/docs` folder.{% if currentVersion == "free-pro-team@latest" %} For example, when you edit your custom domain through the {% data variables.product.prodname_pages %} settings, the custom domain will write to `/docs/CNAME`. For more information about _CNAME_ files, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)."{% endif %}
You cannot publish your project site from any other branch, even if the default branch is not `master` or `gh-pages`.
You cannot publish your project site from any other branch, even if the default branch is not `master` or `gh-pages`.
{% endif %}

View File

@@ -0,0 +1,29 @@
---
title: Changing the visibility of your GitHub Pages site
intro: 'You can manage access control for your project site by publishing the site publicly or privately.'
product: '{% data reusables.gated-features.private-pages %}'
versions:
free-pro-team: '*'
permissions: People with admin permissions for a repository can change the visibility of a {% data variables.product.prodname_pages %} site.
---
### About access control for {% data variables.product.prodname_pages %} sites
If your project site is published from a private or internal repository that's owned by an organization using {% data variables.product.prodname_ghe_cloud %}, you can manage access control for the site. With access control, you can choose to publish the site publicly to anyone on the internet or privately to people with read access to your repository. A privately published site can be used to share your internal documentation or knowledge base with members of your enterprise. You cannot manage access control for an organization site. For more information about the types of {% data variables.product.prodname_pages %} sites, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites)."
Privately published sites are available at a different subdomain than publicly published sites. You can see your site's URL in the repository settings. If you're using a static site generator configured to build the site with the repository name as a path, you may need to update the settings for the static site generator when changing the site to private. For more information, see "[Configuring Jekyll in your {% data variables.product.prodname_pages %} site](/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)" or the documentation for your static site generator.
### Changing the visibility of your {% data variables.product.prodname_pages %} site
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
3. Under "{% data variables.product.prodname_pages %}", select the **{% data variables.product.prodname_pages %} visibility** drop-down menu, then click a visibility.
![Drop-down to choose a visibility for your site](/assets/images/help/pages/public-or-private-visibility.png)
4. To see your published site, under "{% data variables.product.prodname_pages %}", click your site's URL.
![URL of your privately published site](/assets/images/help/pages/click-private-pages-url-to-preview.png)
{% note %}
{% data reusables.pages.twenty-minutes-to-publish %}
{% endnote %}

View File

@@ -11,6 +11,8 @@ versions:
github-ae: '*'
---
{% data reusables.pages.org-owners-can-restrict-pages-creation %}
### Prerequisites
Before you can use Jekyll to create a {% data variables.product.prodname_pages %} site, you must install Jekyll and Git. For more information, see [Installation](https://jekyllrb.com/docs/installation/) in the Jekyll documentation and "[Set up Git](/articles/set-up-git)."
@@ -96,7 +98,8 @@ $ git remote add origin https://<em>HOSTNAME</em>/<em>USER</em>/<em>REPOSITORY</
```
{% data reusables.pages.configure-publishing-source %}
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.sidebar-settings %}{% if currentVersion == "free-pro-team@latest" %}
{% data reusables.pages.choose-visibility %}{% endif %}
{% data reusables.pages.visit-site %}
{% data reusables.pages.admin-must-push %}

View File

@@ -14,6 +14,8 @@ versions:
github-ae: '*'
---
{% data reusables.pages.org-owners-can-restrict-pages-creation %}
### Creating a repository for your site
{% data reusables.pages.new-or-existing-repo %}
@@ -36,7 +38,8 @@ versions:
3. If your chosen publishing source already exists, navigate to the publishing source. If your chosen publishing source doesn't exist, create the publishing source.
4. In the root of the publishing source, create a new file called `index.md` that contains the content you want to display on the main page of your site.
{% data reusables.pages.configure-publishing-source %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.sidebar-settings %}{% if currentVersion == "free-pro-team@latest" %}
{% data reusables.pages.choose-visibility %}{% endif %}
{% data reusables.pages.visit-site %}
{% data reusables.pages.admin-must-push %}

View File

@@ -25,6 +25,7 @@ versions:
{% link_in_list /creating-a-github-pages-site %}
{% link_in_list /adding-a-theme-to-your-github-pages-site-with-the-theme-chooser %}
{% link_in_list /configuring-a-publishing-source-for-your-github-pages-site %}
{% link_in_list /changing-the-visibility-of-your-github-pages-site %}
{% link_in_list /creating-a-custom-404-page-for-your-github-pages-site %}
{% link_in_list /securing-your-github-pages-site-with-https %}
{% link_in_list /using-submodules-with-github-pages %}

View File

@@ -1,6 +1,6 @@
---
title: Unpublishing a GitHub Pages site
intro: 'You can unpublish your {% data variables.product.prodname_pages %} site so that the site is no longer available to {% if currentVersion == "free-pro-team@latest" %}the public{% else %}everyone using {% data variables.product.product_location %}{% endif %}.'
intro: 'You can unpublish your {% data variables.product.prodname_pages %} site so that the site is no longer available.'
redirect_from:
- /articles/how-do-i-unpublish-a-project-page/
- /articles/unpublishing-a-project-page/