diff --git a/assets/images/help/codespaces/codespaces-org-billing-add-users.png b/assets/images/help/codespaces/codespaces-org-billing-add-users.png new file mode 100644 index 0000000000..5e7f4a3e3e Binary files /dev/null and b/assets/images/help/codespaces/codespaces-org-billing-add-users.png differ diff --git a/assets/images/help/codespaces/codespaces-org-billing-settings.png b/assets/images/help/codespaces/codespaces-org-billing-settings.png new file mode 100644 index 0000000000..6e542cb529 Binary files /dev/null and b/assets/images/help/codespaces/codespaces-org-billing-settings.png differ diff --git a/assets/images/help/codespaces/org-user-permission-settings-outside-collaborators.png b/assets/images/help/codespaces/org-user-permission-settings-outside-collaborators.png deleted file mode 100644 index e28c239dfb..0000000000 Binary files a/assets/images/help/codespaces/org-user-permission-settings-outside-collaborators.png and /dev/null differ diff --git a/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md b/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md index f175675047..9781ece278 100644 --- a/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md +++ b/content/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account.md @@ -90,8 +90,6 @@ You can add further script, preferences, configuration files to your dotfiles re If your codespace fails to pick up configuration settings from dotfiles, see "[Troubleshooting dotfiles for {% data variables.product.prodname_codespaces %}](/codespaces/troubleshooting/troubleshooting-dotfiles-for-codespaces)." -## Other available settings - You can also personalize {% data variables.product.prodname_codespaces %} using additional [{% data variables.product.prodname_codespaces %} settings](https://github.com/settings/codespaces): - To enable GPG verification, see "[Managing GPG verification for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces)." diff --git a/content/codespaces/developing-in-codespaces/creating-a-codespace.md b/content/codespaces/developing-in-codespaces/creating-a-codespace.md index 5e5378d571..f626933523 100644 --- a/content/codespaces/developing-in-codespaces/creating-a-codespace.md +++ b/content/codespaces/developing-in-codespaces/creating-a-codespace.md @@ -46,23 +46,20 @@ If you want to use Git hooks for your codespace, then you should set up hooks us When you have access to {% data variables.product.prodname_github_codespaces %}, you'll see a "Codespaces" tab within the **{% octicon "code" aria-label="The code icon" %} Code** drop-down menu when you view a repository. -You'll have access to codespaces under the following conditions: +You'll have access to {% data variables.product.prodname_github_codespaces %} under the following conditions: -* You are a member of an organization that has enabled {% data variables.product.prodname_codespaces %} and set a spending limit. -* An organization owner has granted you access to {% data variables.product.prodname_codespaces %}. -* The repository is owned by the organization that has enabled {% data variables.product.prodname_codespaces %}. +Either all of these are true: +* You are a member, or outside collaborator, of an organization that has enabled {% data variables.product.prodname_codespaces %} and set a spending limit. +* The organization owner has allowed you to create codespaces at the organization's expense. +* The repository for which you want to create a codespace is owned by this organization. -{% note %} - -**Note:** Individuals who have already joined the beta with their personal {% data variables.product.prodname_dotcom %} account will not lose access to {% data variables.product.prodname_codespaces %}, however {% data variables.product.prodname_codespaces %} for individuals will continue to remain in beta. - -{% endnote %} - -Organization owners can allow all members of the organization to create codespaces, limit codespace creation to selected organization members, or disable codespace creation. For more information about managing access to codespaces within your organization, see "[Enable Codespaces for users in your organization](/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization#enable-codespaces-for-users-in-your-organization)." +Or both of these are true: +* You are participating in the beta of {% data variables.product.prodname_codespaces %} for individual users. +* Either you own the repository for which you want to create a codespace, or it is owned by an organization of which you are either a member or an outside collaborator. Before {% data variables.product.prodname_codespaces %} can be used in an organization, an owner or billing manager must have set a spending limit. For more information, see "[About spending limits for Codespaces](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces#about-spending-limits-for-codespaces)." -If you would like to create a codespace for a repository owned by your personal account or another user, and you have permission to create repositories in an organization that has enabled {% data variables.product.prodname_github_codespaces %}, you can fork user-owned repositories to that organization and then create a codespace for the fork. +Organization owners can specify who can create and use codespaces at the organization's expense. Organization owners can also prevent any codespace usage being charged to the organization. For more information, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)." ## Creating a codespace diff --git a/content/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization.md b/content/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization.md index 8d8d58ac5a..ff040d9a82 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization.md +++ b/content/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization.md @@ -1,9 +1,9 @@ --- title: Enabling GitHub Codespaces for your organization -shortTitle: Enable Codespaces -intro: 'You can control which users in your organization can use {% data variables.product.prodname_github_codespaces %}.' +shortTitle: 'Enable {% data variables.product.prodname_codespaces %}' +intro: "You can control which users in your organization can use {% data variables.product.prodname_github_codespaces %} at the organization's expense." product: '{% data reusables.gated-features.codespaces %}' -permissions: 'To manage user permissions for {% data variables.product.prodname_github_codespaces %} for an organization, you must be an organization owner.' +permissions: "To alter an organization's billing settings, you must be an organization owner." redirect_from: - /codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization - /codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization @@ -13,25 +13,23 @@ versions: type: how_to topics: - Codespaces - - Permissions + - Billing - Administrator --- - ## About enabling {% data variables.product.prodname_github_codespaces %} for your organization -Organization owners can control which users in your organization can create and use codespaces. +Organization owners can control which users in your organization can create and use codespaces at the organization's expense. -To use codespaces in your organization, you must do the following: +Only people who can clone a repository can create a codespace for that repository. To allow people to create codespaces for repositories owned by your organization, you must: + +- Ensure that users have at least write access to the repositories where they want to use a codespace. For more information, see "[Managing teams and people with access to your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)." +- Ensure that your organization does not have an IP address allow list enabled. For more information, see "[Managing allowed IP addresses for your organization](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} + +To allow people to create codespaces for which your organization will be billed, you must: -- Ensure that users have [at least write access](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization) to the repositories where they want to use a codespace. -- [Enable {% data variables.product.prodname_github_codespaces %} for users in your organization](#enable-codespaces-for-users-in-your-organization). You can choose to allow {% data variables.product.prodname_codespaces %} for selected users or only for specific users. - [Set a spending limit](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces) -- Ensure that your organization does not have an IP address allow list enabled. For more information, see "[Managing allowed IP addresses for your organization](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} - -By default, a codespace can only access the repository from which it was created. If you want codespaces in your organization to be able to access other organization repositories that the codespace creator can access, see "[Managing access and security for {% data variables.product.prodname_codespaces %}](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)." - -## Enable {% data variables.product.prodname_codespaces %} for users in your organization +- [Choose who can create codespaces that are billed to your organization](#choose-who-can-create-codespaces-that-are-billed-to-your-organization) {% ifversion fpt %} {% note %} @@ -40,31 +38,44 @@ By default, a codespace can only access the repository from which it was created {% endnote %} {% endif %} + +By default, a codespace can only access the repository from which it was created. If you want codespaces in your organization to be able to access other organization repositories that the codespace creator can access, see "[Managing repository access for your organization's codespaces](/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces)." + +## Choose who can create codespaces that are billed to your organization + {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %} -1. Under "User permissions", select one of the following options: +1. Under "Billing," select one of the following options: - * **Selected users** to select specific organization members to use {% data variables.product.prodname_codespaces %}. - * **Allow for all members** to allow all your organization members to use {% data variables.product.prodname_codespaces %}. - * **Allow for all members and outside collaborators** to allow all your organization members as well as outside collaborators to use {% data variables.product.prodname_codespaces %}. + * **Disabled** - Your organization will not be charged for codespace usage. {% data variables.product.prodname_codespaces %} created for your organization's repositories will be billed to the individual users who create them. + * **Selected members** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by selected members will be billed to the organization. + * **All members** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by members of your organization will be billed to the organization. + * **All members and outside collaborators** - {% data variables.product.prodname_codespaces %} created for your organization's repositories by organization members and outside collaborators will be billed to the organization. - ![Radio buttons for "User permissions"](/assets/images/help/codespaces/org-user-permission-settings-outside-collaborators.png) + ![Radio buttons for "Billing"](/assets/images/help/codespaces/codespaces-org-billing-settings.png) {% note %} - **Note:** When you select **Allow for all members and outside collaborators**, all outside collaborators who have been added to specific repositories can create and use {% data variables.product.prodname_codespaces %}. Your organization will be billed for all usage incurred by outside collaborators. For more information on managing outside collaborators, see "[About outside collaborators](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization#about-outside-collaborators)." + **Note:** When you select **All members and outside collaborators**, all outside collaborators who have been added to specific repositories can create and use {% data variables.product.prodname_codespaces %} for those repositories, and your organization will be billed for this usage. For more information on managing outside collaborators, see "[About outside collaborators](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization#about-outside-collaborators)." {% endnote %} 1. Click **Save**. +1. If you chose **Selected members**, an input box is displayed for you to enter the names of users you want to select. + + ![Input box for selecting users](/assets/images/help/codespaces/codespaces-org-billing-add-users.png) ## Disabling {% data variables.product.prodname_codespaces %} for your organization +You can prevent the creation and use of codespaces billable to your organization. + +{% data reusables.codespaces.codespaces-disabling-org-billing %} + {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %} -1. Under "User permissions", select **Disabled**. +1. Under "Billing," select **Disabled**. ## Setting a spending limit diff --git a/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md b/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md index 1d29b756d6..cc3203c924 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md +++ b/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md @@ -35,11 +35,15 @@ You can set a usage limit for the codespaces in your organization or repository. ## Disabling or limiting {% data variables.product.prodname_codespaces %} -You can disable the use of {% data variables.product.prodname_codespaces %} in your organization or repository. For more information, see "[Managing repository access for your organization's codespaces](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)." +You can disable all use of {% data variables.product.prodname_github_codespaces %} that would be billed to your organization. Alternatively, you can specify which organization members or collaborators can use {% data variables.product.prodname_codespaces %} at your organization's expense. For more information, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)." -You can also limit the individual users who can use {% data variables.product.prodname_codespaces %}. For more information, see "[Managing user permissions for your organization](/codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization)." +{% data reusables.codespaces.codespaces-disabling-org-billing %} -You can limit the choice of machine types that are available for repositories owned by your organization. This allows you to prevent people using overly resourced machines for their codespaces. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)." +You can configure which repositories can be accessed from codespaces created for a particular repository. For more information, see "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)." + +You can limit the choice of types of machine that are available for codespaces created from repositories owned by your organization. This allows you to prevent people using overly resourced machines for their codespaces, and incurring unnecessary charges. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)." + +You can also restrict how long a codespace can remain unused before it is automatically deleted. This can help to reduce storage costs for {% data variables.product.prodname_codespaces %}. For more information, see "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)." ## Deleting unused codespaces @@ -47,6 +51,6 @@ Your users can delete their codespaces in https://github.com/codespaces and from {% note %} -**Note:** Only the person who created a codespace can delete it. There is currently no way for organization owners to delete codespaces created within their organization. +**Note:** Codespaces are automatically deleted after they have been stopped and have remained inactive for a defined number of days. For more information, see "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)." A codespace can only be manually deleted by the person who created the codespace. {% endnote %} diff --git a/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md b/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md index 0f5f11dbd1..5460d78ed6 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md +++ b/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md @@ -20,7 +20,7 @@ redirect_from: {% warning %} -**Deprecation note**: The access and security setting described below is now deprecated and is documented here for reference only. To enable expanded access to other repositories, add the requested permissions to your dev container definition. For more information, see "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)." +**Deprecation note**: The access and security setting described below is now deprecated and is documented here for reference only. To enable expanded access to other repositories, add the requested permissions to your `devcontainer.json` configuration file. For more information, see "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)." {% endwarning %} diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md index 87c0759571..7521ee7661 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md @@ -43,6 +43,8 @@ For example, you could create an organization-wide policy that restricts the mac If you add an organization-wide policy, you should set it to the largest choice of machine types that will be available for any repository in your organization. You can then add repository-specific policies to further restrict the choice. +{% data reusables.codespaces.codespaces-org-policies-note %} + ## Adding a policy to limit the available machine types {% data reusables.profile.access_org %} diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md index 9bde5042e8..685dfd1db2 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md @@ -40,6 +40,8 @@ When you create a policy, you choose whether it applies to all repositories in y If you add an organization-wide policy with a timeout constraint, you should set the timeout to the longest acceptable period. You can then add separate policies that set the maximum timeout to a shorter period for specific repositories in your organization. +{% data reusables.codespaces.codespaces-org-policies-note %} + ## Adding a policy to set a maximum idle timeout period {% data reusables.profile.access_org %} diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces.md index 06d0b8f5e8..68dda36c9c 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces.md @@ -26,6 +26,8 @@ When you create a policy, you choose whether it applies to all repositories in y If you add an organization-wide policy with a retention constraint, you should set the retention period to the longest acceptable period. You can then add separate policies that set the maximum retention to a shorter period for specific repositories in your organization. +{% data reusables.codespaces.codespaces-org-policies-note %} + ## Adding a policy to set a maximum codespace retention period {% data reusables.profile.access_org %} diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md index 562db559ea..ee23806884 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md @@ -36,6 +36,8 @@ For example, you could create an organization-wide policy that restricts the vis If you add an organization-wide policy, you should set it to the most lenient visibility option that will be available for any repository in your organization. You can then add repository-specific policies to further restrict the choice. +{% data reusables.codespaces.codespaces-org-policies-note %} + ## Adding a policy to limit the port visibility options {% data reusables.profile.access_org %} diff --git a/content/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces.md b/content/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces.md index 689293eaff..199a6e4554 100644 --- a/content/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces.md +++ b/content/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces.md @@ -132,3 +132,7 @@ When you enable access and security for a repository owned by your personal acco 1. If you chose "Selected repositories", select the drop-down menu, then click a repository to allow the repository's codespaces to access other repositories you own. Repeat for all repositories whose codespaces you want to access other repositories you own. !["Selected repositories" drop-down menu](/assets/images/help/settings/codespaces-access-and-security-repository-drop-down.png) + +## Further reading + +- "[Managing repository access for your organization's codespaces](/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces)" diff --git a/data/reusables/codespaces/codespaces-disabling-org-billing.md b/data/reusables/codespaces/codespaces-disabling-org-billing.md new file mode 100644 index 0000000000..a3d7ca0c7a --- /dev/null +++ b/data/reusables/codespaces/codespaces-disabling-org-billing.md @@ -0,0 +1,5 @@ +{% note %} + +**Note**: If you disable billable codespaces use for your organization, anyone who can create codespaces as an individual user, and can clone a repository in your organization, will still be able to create a codespace for that repository. However, this will not incur any charge for your organization. For information about restricting access to a repository, see "[Managing teams and people with access to your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)." + +{% endnote %} \ No newline at end of file diff --git a/data/reusables/codespaces/codespaces-org-policies-note.md b/data/reusables/codespaces/codespaces-org-policies-note.md new file mode 100644 index 0000000000..69e6530791 --- /dev/null +++ b/data/reusables/codespaces/codespaces-org-policies-note.md @@ -0,0 +1,5 @@ +{% note %} + +**Note**: Organization policies you define for {% data variables.product.prodname_codespaces %} only apply to codespaces for which your organization will be billed. If an individual user creates a codespace for a repository in your organization, and the organization is not billed, then the codespace will not be bound by these policies. For information on how to choose who can create codespaces that are billed to your organization, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](https://docs-internal-29134-ad7bd8.preview.ghdocs.com/en/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)." + +{% endnote %} \ No newline at end of file diff --git a/data/reusables/codespaces/codespaces-spending-limit-requirement.md b/data/reusables/codespaces/codespaces-spending-limit-requirement.md index 61e7031435..69820f0878 100644 --- a/data/reusables/codespaces/codespaces-spending-limit-requirement.md +++ b/data/reusables/codespaces/codespaces-spending-limit-requirement.md @@ -1,9 +1,9 @@ {% note %} -**Note:** You must set a spending limit before you can use {% data variables.product.prodname_codespaces %}. +**Note:** You must set a non-zero spending limit before you can use {% data variables.product.prodname_codespaces %}. {% endnote %} -By default, your organization or enterprise will have a {% data variables.product.prodname_github_codespaces %} spending limit of $0, which prevents new codespaces from being created or existing codespaces from being opened. To allow your users to create codespaces in your organization, set the limit to a value higher than $0. +By default, your organization or enterprise will have a {% data variables.product.prodname_github_codespaces %} spending limit of $0. This prevents new codespaces from being created, or existing codespaces from being opened, if this would incur a billable cost to your organization or enterprise. To allow your users to create codespaces in your organization, set the limit to a value higher than $0. {% data reusables.billing.overages-billed-monthly %}