1
0
mirror of synced 2025-12-19 09:57:42 -05:00

[EDI] Audit and implement: /billing/concepts/products/ GitHub Codespaces (#57106)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Felicity Chapman
2025-08-14 20:32:13 +01:00
committed by GitHub
parent 9075b64ffb
commit fd3fbf5776
12 changed files with 79 additions and 200 deletions

View File

@@ -23,77 +23,78 @@ redirect_from:
contentType: concepts
---
## About {% data variables.product.prodname_github_codespaces %} pricing
## How use of {% data variables.product.prodname_github_codespaces %} is measured
{% data reusables.billing.authorization-charge %}
A {% data variables.product.prodname_github_codespaces %} instance (a "codespace") incurs two types of charges.
{% data reusables.codespaces.codespaces-free-for-personal-intro %}
* **Compute time**: processing time and power, while the codespace is active.
* **Storage**: amount of disk space the codespace or prebuild occupies, while it exists.
Organizations can choose whether codespaces created from their repositories will be user-owned or organization-owned. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/choosing-who-owns-and-pays-for-codespaces-in-your-organization). An organization pays for a codespace if all the following things are true.
In addition, any prebuilt codespaces are generated using actions minutes, see [AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds).
* The organization has chosen for codespaces to be organization-owned.
{% data reusables.codespaces.when-an-org-pays %}
### Compute time
For more information about enabling {% data variables.product.prodname_github_codespaces %} for users, see [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/enabling-or-disabling-github-codespaces-for-your-organization).
The compute time for a codespace is the length of time for which that codespace is active. Total use of compute time for each processor type is calculated by summing the time used by all codespaces billable to a particular account. These totals are reported to the billing service every hour, and are billed monthly.
Otherwise use of {% data variables.product.prodname_github_codespaces %} applies to the personal account of the person who created the codespace, and either consumes some of the monthly included usage for their personal account, or their account is billed according to their usage in excess of their included quotas.
### Storage volume for codespaces
The Free, Team, and Enterprise plans for organization and enterprise accounts do not include any free use of {% data variables.product.prodname_github_codespaces %}.
Storage is a time-based measurement of the amount of storage used in GB-hours. The storage measured for codespaces includes:
{% ifversion ghec %}
{% data reusables.codespaces.codespaces-unavailable-for-emus %}
{% endif %}
* Any files you use in a codespace, such as cloned repositories and configuration files
* Any data loaded to the codespace (for example, as input or output of the software running in the repository)
* Any extensions
* Any prebuilt codespaces, see [AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)
* Any custom dev containers, see [AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#creating-a-custom-dev-container-configuration)
{% ifversion fpt %}
### Storage volume for codespaces built from custom configurations
## Monthly included storage and core hours for personal accounts
By default, your codespace is built from the default Linux image, also known as the "default dev container configuration". If you build a codespace from a custom dev container configuration, you will see an increased storage volume. See [AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#creating-a-custom-dev-container-configuration).
The following storage and core hours of usage are included, free of charge, for personal accounts:
* **Default Linux image**: the storage volume for your codespace is based only on the files in your repository and any files you add to the codespace.
* **Custom base image**: the storage volume for your codespace includes the custom dev container, in addition to all the files in the repository and codespace.
| Account plan | Storage per month | Core hours per month |
Containers based on the default image are not included in your storage volume, even if you add features in your dev container configuration. See [AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file).
## Free and billed use by personal accounts
{% data variables.product.github %} plans for organizations and enterprises do not include a free quota for {% data variables.product.prodname_github_codespaces %}.
### Free quota
All {% data variables.product.github %} personal accounts include a quota of free compute time and storage for {% data variables.product.prodname_github_codespaces %}. Any usage beyond the included amounts is billed to the personal account.
| Account plan | Storage per month | Compute time per month |
| ------------ | ----------------- | -------------------- |
| {% data variables.product.prodname_dotcom %} Free for personal accounts | 15 GB-month | 120 |
| {% data variables.product.prodname_dotcom %} Pro | 20 GB-month | 180 |
| {% data variables.product.prodname_dotcom %} Free for personal accounts | 15 GB-month | 120 hrs |
| {% data variables.product.prodname_dotcom %} Pro | 20 GB-month | 180 hrs |
### Understanding GB-months and core hours
{% data reusables.codespaces.codespaces-unavailable-for-emus %}
The included usage for personal accounts is measured in GB-months and core hours.
{% data reusables.codespaces.tips-included-usage %}
#### GB-month
### Using more than your included quota
The GB-month unit of storage is a time-based measurement, 1 GB-month being 1 GB of storage usage for one whole month. The disk space used by all of your codespaces and prebuilds is assessed once an hour and your current GB-month usage is recalculated. Therefore, while you have codespaces and prebuilds, your GB-month usage will increase throughout the month. For example, if the storage totals 15 GB, and remains unchanged throughout your monthly billing cycle, then you will have used 7.5 GB halfway through the month, and 15 GB at the end of the month. See [About billing for storage usage](#about-billing-for-storage-usage) later in this article.
If your account does not have a valid payment method on file, usage is blocked once you use up your quota.
#### Core hour
A "core hour" is a measure used for included compute usage. To calculate core hours, multiply the number of hours for which a codespace has been active by the multiplier in the pricing table later in this article. For the basic machine types, the multiplier is the number of processor cores in the machine that hosts the codespace. For example:
* A 2-core machine used for 1 hour equals 2 core hours
* An 8-core machine used for 1 hour equals 8 core hours
* An 8-core machine used for 2 hours equals 16 core hours
### Using your included usage
You will be notified by email when you have used 75%, 90%, and 100% of your included quotas. Notifications are also displayed in a "toast" message within {% data variables.product.prodname_vscode_shortname %} and the {% data variables.product.prodname_vscode_shortname %} web client. You can turn off email notifications if required. See [AUTOTITLE](/billing/managing-your-billing/using-budgets-control-spending).
When a personal account has used all of either the included storage or compute usage (whichever is reached first), and has no payment method defined, use of {% data variables.product.prodname_github_codespaces %} will be blocked. You must set up a payment method to continue using {% data variables.product.prodname_github_codespaces %} during the current billing month. At the beginning of the next monthly billing cycle the included usage is reset. Storage will not be billed while use of {% data variables.product.prodname_github_codespaces %} is blocked.
You can view details of your usage for the current month at any time. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
If you are blocked from resuming a codespace and you want to continue to work on changes you have made in your codespace, you can do any of the following:
If you are blocked from resuming a codespace and need to continue work on changes in your codespace, you can do any of the following:
* Add a payment method and review your budget settings to ensure they meet your usage needs. See [AUTOTITLE](/billing/tutorials/set-up-budgets#viewing-budgets).
* Export the changes from the codespace to a branch. See [AUTOTITLE](/codespaces/troubleshooting/exporting-changes-to-a-branch).
* Wait for your monthly included usage to reset at the start of the next monthly billing cycle.
If you have used all of either your included storage usage or your included compute usage, and you have set up a payment method, any further use of codespaces owned by your personal account will incur charges for whichever type of usage has no remaining included quota. You will not be charged for the other type of usage until you have also used all of its included quota. See [AUTOTITLE](/billing/managing-your-billing/using-budgets-control-spending).
## Paying for use
{% data reusables.codespaces.tips-included-usage %}
You pay for using {% data variables.product.prodname_codespaces %} using the payment method set up for your {% data variables.product.github %} account. See [AUTOTITLE](/billing/how-tos/set-up-payment/manage-payment-info).
{% endif %}
* To estimate costs for paid {% data variables.product.prodname_github_codespaces %} usage, use the {% data variables.product.github %} [pricing calculator](https://github.com/pricing/calculator?feature=codespaces).
* To view your current minutes and storage, see [AUTOTITLE](/billing/managing-billing-for-your-products/viewing-your-product-usage).
* To optimize the use of codespaces:
* For personal accounts, see [AUTOTITLE](/codespaces/troubleshooting/troubleshooting-included-usage)
* For organization accounts, see [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)
## Pricing for paid usage
### Pricing
A {% data variables.product.prodname_github_codespaces %} instance (a "codespace") incurs charges for compute time, while it is active, and for the amount of disk space the codespace occupies, while it exists. The compute cost is proportional to the number of processor cores in the machine type you choose for your codespace, as shown in the following table. For example, the compute cost of using a codespace for an hour on a 16-core machine is eight times greater than a 2-core machine.
The compute cost is proportional to the number of processor cores in the machine type you choose for your codespace, as shown in the following table. For example, the compute cost of using a codespace for an hour on a 16-core machine is eight times greater than a 2-core machine.
| Component | Machine type | Unit of measure | Included usage multiplier | Price |
| ------------------- | ------------ | --------------- | ------------------------- | ----- |
@@ -104,101 +105,32 @@ A {% data variables.product.prodname_github_codespaces %} instance (a "codespace
| Codespaces compute | 32 core | 1 hour | 32 | $2.88 |
| Codespaces storage | Storage | 1 GB-month | Not applicable | $0.07 |
For more information about the GB-month unit of measure, see [About billing for storage usage](#about-billing-for-storage-usage).
## How costs are assigned to a billable account
If you enable prebuilding of codespaces this will incur additional charges. See [About billing for {% data variables.product.prodname_codespaces %} prebuilds](#about-billing-for-codespaces-prebuilds).
All usage is billed either to the account of the person who created the codespace or to the owning-organization. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/choosing-who-owns-and-pays-for-codespaces-in-your-organization).
## About your bill for {% data variables.product.prodname_github_codespaces %}
When a repository is transferred to a different organization, ownership and billing responsibility for any codespaces associated with that repository change according to the settings of the new organization.
{% data variables.product.prodname_github_codespaces %} is billed in US dollars (USD) according to the amount of compute time and storage space your codespaces use. {% data reusables.codespaces.codespaces-monthly-billing %}
If a user is removed from an organization or repository, their codespaces are automatically deleted.
Billing for {% data variables.product.prodname_github_codespaces %} shares your account's existing payment method, and receipt. See [AUTOTITLE](/billing/managing-your-billing/about-the-billing-cycle).
### Forked repositories
If you are an organization owner{% ifversion ghec %} or enterprise owner{% endif %}, you can connect an Azure Subscription ID to your organization {% ifversion ghec %}or enterprise{% endif %} account to enable and pay for {% data variables.product.prodname_github_codespaces %} usage. See [AUTOTITLE](/billing/managing-the-plan-for-your-github-account/connecting-an-azure-subscription).
Codespaces created from a forked repository are billed to your personal account unless the upstream (or parent) repository is in an organization that has allowed you - as a member, or outside collaborator, of the organization - to use codespaces at the organization's expense.
## About billing for compute usage
For example, consider a member, or outside collaborator, of an organization that has allowed billing for codespaces for that user. If the user has permission to fork an organization-owned private repository, they can subsequently create and use a codespace for the new repository at the organization's expense. This is because the organization is the owner of the parent repository. Note that the organization owner can remove the user's access to the private repository, the forked repository, and therefore also the codespace. The organization owner can also delete the parent repository which will also delete the forked repository. See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-forking-policy-for-your-repository).
The compute usage of a codespace is the length of time for which that codespace is active multiplied by the multiplier in the pricing table for the machine type of the codespace. Total compute usage is calculated by summing the time used by all codespaces billable to a particular account. These totals are reported to the billing service every hour, and are billed monthly.
{% data reusables.codespaces.prebuilds-billing-for-forks %}
As an example, if a codespace is active for 1 hour and 15 minutes, then the compute cost will be the hourly cost of the codespace, as determined by its machine type, multiplied by 1.25.
### {% data variables.product.prodname_github_codespaces %} templates
You can control compute usage by stopping your codespaces. For information, see [AUTOTITLE](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace). Codespaces are stopped automatically after a configurable period of inactivity. The timeout period can be configured by the user, or at the organization level. See [AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-timeout-period-for-github-codespaces) and [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period).
Any organization can maintain a template repository for use with {% data variables.product.prodname_github_codespaces %}. As with any other repository in an organization, a codespace created from a template repository is billed to the organization if the organization allows the user creating the codespace to do so at the organization's expense. Otherwise, the codespace is billed to the user who creates the codespace.
## About billing for storage usage
If a user publishes a codespace created from a template, the codespace is published to a new repository owned by the user's personal account. If the codespace is currently billed to an organization, ownership and billing of the codespace transfer to the user who created the codespace.
For {% data variables.product.prodname_github_codespaces %} billing purposes, storage comprises the disk space used by all of the codespaces and prebuilds in your account. This includes any files you use in a codespace, such as cloned repositories, configuration files, data loaded to the codespace (for example as input or output of the software running in the repository), and extensions, among others. Storage is billed for all of your existing codespaces, regardless of whether they are active or inactive with the exception of blocked usage due to exhausted included usage quota or reaching your budget limit. The storage billing for a codespace ends when it is deleted. However, deleting a codespace does not reduce your used storage amount for the current billing month as this is a cumulative figure.
A {% data variables.enterprise.prodname_managed_user %} cannot be the billable owner of a codespace. Therefore:
### Storage billing for containers based on the default image
When you use the default dev container configuration, your container is built from the default Linux image for codespaces. See [AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#using-the-default-dev-container-configuration).
Containers based on the default image are not counted as used storage, even if you add features in your dev container configuration. See [AUTOTITLE](/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file).
If you use the default image, the storage usage for your codespace will be based on the files in your repository, and any files you subsequently add to the codespace. If you use an alternative base image, then the resulting container and all of the files in the codespace will be counted as used storage.
{% data reusables.codespaces.check-for-default-image %}
### Reporting storage usage
Codespace storage is reported in GB-months. Your billing month runs from a fixed day in one month until the same day in the next month. In most cases the day of the month is determined by the day you started on your current {% data variables.product.prodname_dotcom %} plan. Your GB-month storage is calculated as follows. Once every hour, the storage used by all of your currently active and stopped codespaces is assessed. This figure is then divided by the number of hours in the current billing month: `total storage size / hours this month`. The result is added to the running total for codespace storage for the month.
For example, if you have one codespace that uses 100 GB of storage and has existed for one hour you will have used `100 / (24 * 30) = 0.1388` GB-months of storage in a 30-day month. If your use of {% data variables.product.prodname_github_codespaces %} during a 30-day month consists of two 100 GB codespaces that both existed for three full days then there will be `24 * 3` hourly reports for the storage of these codespaces, giving a total of `(24 * 3) * 200 / (24 * 30) = 20` GB-months.
For each hourly report, the storage usage for the previous hour is calculated in seconds. As a result, you won't be charged for a full hour of storage if a codespace did not exist for the full 60 minutes. At the end of the month, {% data variables.product.prodname_dotcom %} rounds your storage to the nearest MB.
Organization owners can:
* List the currently active and stopped codespaces for your organization. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization). In addition to the cost of these codespaces, the cost of {% data variables.product.prodname_github_codespaces %} for the current month may include costs for codespaces that existed earlier in the current month but have since been deleted.
* See the total {% data variables.product.prodname_github_codespaces %} compute and storage usage for your organization for the current month to date. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
* Configure your organization settings to manage the cost of {% data variables.product.prodname_github_codespaces %}. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization).
To estimate the costs for usage-based billing, you can use the {% data variables.product.prodname_dotcom %} [pricing calculator](https://github.com/pricing/calculator?feature=codespaces).
## About billing for {% data variables.product.prodname_codespaces %} prebuilds
{% data reusables.codespaces.prebuilds-definition %} See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds).
### {% data variables.product.prodname_actions %} costs for prebuilds
Prebuilds are created and updated by running a {% data variables.product.prodname_actions %} workflow on a {% data variables.product.prodname_dotcom %}-hosted runner. You can configure how you want prebuild updates to be automatically triggered. For information, see [AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild).
As with other workflows, while prebuild workflows are running they consume {% data variables.product.prodname_actions %} minutes included with your account, if you have any, or they incur charges for {% data variables.product.prodname_actions %} minutes. For more information about pricing for {% data variables.product.prodname_actions %} minutes, see [AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions). There is no associated {% data variables.product.prodname_codespaces %} compute cost for creating or updating prebuilds.
You can track usage of prebuild workflows and storage by downloading a usage report for your account. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
### Storage costs for prebuilds
In addition to {% data variables.product.prodname_actions %} minutes, you will also be billed for the storage of prebuilds associated with each prebuild configuration, for a given repository and region. Storage of prebuilds is billed at the same rate as storage of codespaces.
The storage cost for a prebuild in a single region will be similar to the storage cost that will be incurred for storing a single codespace created from that prebuild. The storage cost for the generated codespace may be more than the cost for the prebuild if, for example, the `updateContentCommand` and `postCreateCommand` commands are used during codespace creation to download more files to the dev container.
The total storage costs associated with a prebuild configuration will depend on the following factors.
* The price of storage per GB (see the table earlier in this article)
* The size of the generated prebuild in GB
* The number of regions in which the prebuild is available (because a copy of the prebuild is stored in each region)
* The number of older versions of the prebuild that are retained
The storage cost for the prebuilds generated by a prebuild configuration is therefore calculated as: `price per GB * size (GB) * regions * versions`.
You can check how many GB-months of storage has been used by prebuilds by reviewing the current billing data for your personal or organization account. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
{% data reusables.codespaces.prebuilds-billing-for-forks %} See [How billing is handled for forked repositories](#how-billing-is-handled-for-forked-repositories).
### Controlling the cost of prebuilds
To reduce consumption of Actions minutes, you can set a prebuild to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. You can also manage your storage usage by adjusting the number of previous versions of each prebuild that are retained. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds).
To limit the storage costs associated with prebuilds, you can choose to create prebuilds only in selected regions, and you can specify the number of older versions of prebuilds that will be retained. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds).
If you delete a prebuild configuration, all the associated prebuilds are deleted, reducing your storage consumption from that point onward. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/managing-prebuilds#deleting-a-prebuild-configuration).
Prebuilds can be updated multiple times during a billing month. Each update may change the size of the prebuild, which affects your storage charges. For details of how storage is calculated during a billing month, see [About billing for storage usage](#about-billing-for-storage-usage) earlier in this article.
>[!TIP] As with deleting codespaces, deleting prebuilds does not reduce your used storage amount for the current billing month as this is a cumulative figure.
### Cost of codespaces created from prebuilds
Use of codespaces created using prebuilds is charged at the same rate as regular codespaces.
* A {% data variables.enterprise.prodname_managed_user %} can only create a codespace from a template if the codespace is billed to an organization.
* A {% data variables.enterprise.prodname_managed_user %} cannot publish a codespace created from a template to a new repository.
## Managing your budget for {% data variables.product.prodname_github_codespaces %}
@@ -208,61 +140,8 @@ Use of codespaces created using prebuilds is charged at the same rate as regular
{% data reusables.codespaces.exporting-changes %}
## Viewing projected usage for an organization
## Further reading
Organization owners and billing managers can view an estimated total usage cost for {% data variables.product.prodname_github_codespaces %} for the organization, for the current monthly billing cycle. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage#viewing-github-codespaces-usage-for-your-organization-account).
The projected usage shown on the billing page for an organization is calculated based on the total cost for {% data variables.product.prodname_codespaces %} compute and storage usage incurred during the previous seven days, prior to the current day. This is projected forward for the remainder of the billing month to give you an idea of how much the total cost might be for the current billing cycle.
The calculation used for this estimate is:
`<cost for the previous 7 full days>/7 * <days remaining in the billing month, including the current day> + <cost already accrued in this billing month>`
The projected usage does not take into account information such as whether {% data variables.product.prodname_github_codespaces %} is still enabled, the number or size of codespaces that currently exist, or your prebuild settings. For this reason, if all of the organization's codespaces and prebuilds were deleted today, the projected usage for the billing month would still show a figure higher than the accrued usage. However, after seven days have elapsed, with no further {% data variables.product.prodname_github_codespaces %} usage, the projected usage will be the same as the currently accrued usage.
## Limiting the machine types for organization-owned codespaces
By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. See [AUTOTITLE](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository) and [AUTOTITLE](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace).
If a machine type that has more resources is chosen, this will affect the per-hour charge for that codespace, as shown in the table [earlier in this article](#pricing-for-paid-usage).
Organization owners can create a policy to limit the choice of machine types available to users for codespaces that are billed to an organization or enterprise account. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types).
## Limiting the number of organization-owned codespaces
Organization owners can limit the number of codespaces that people can create, where the organization will be billed for the codespace. This can help to reduce storage charges for the organization. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-number-of-organization-billed-codespaces-a-user-can-create).
## How billing is handled for forked repositories
Usage of codespaces created from a forked repository will be billed to your personal account unless the upstream (or parent) repository is in an organization that has allowed you - as a member, or outside collaborator, of the organization - to use codespaces at the organization's expense.
For example, consider a member, or outside collaborator, of an organization that has allowed billing for codespaces for that user. If the user has permission to fork an organization-owned private repository, they can subsequently create and use a codespace for the new repository at the organization's expense. This is because the organization is the owner of the parent repository. Note that the organization owner can remove the user's access to the private repository, the forked repository, and therefore also the codespace. The organization owner can also delete the parent repository which will also delete the forked repository. See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-forking-policy-for-your-repository).
{% data reusables.codespaces.prebuilds-billing-for-forks %}
## How billing is handled when a repository is transferred to another organization
Usage is calculated every hour. An organization pays for usage of codespaces created from any repository owned by the organization, where the organization settings permit the organization to be billed. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/choosing-who-owns-and-pays-for-codespaces-in-your-organization). When a repository is transferred out of your organization, ownership and billing responsibility for any codespaces associated with that repository will change accordingly.
## How billing is handled for {% data variables.product.prodname_github_codespaces %} templates
You can get started on a new project by creating a codespace from a template. Codespaces created from templates aren't initially associated with a repository, but you can publish the codespace to a repository owned by your personal account. See [AUTOTITLE](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template).
Any organization can maintain a template repository for use with {% data variables.product.prodname_github_codespaces %}. As with any other repository in an organization, a codespace created from a template repository is billed to the organization if the organization allows the user creating the codespace to do so at the organization's expense. Otherwise, the codespace is billed to the user who creates the codespace.
If a user publishes a codespace created from a template, the codespace is published to a new repository owned by the user's personal account. If the codespace is currently billed to an organization, ownership and billing of the codespace transfer to the user who created the codespace.
{% ifversion ghec %}
A {% data variables.enterprise.prodname_managed_user %} cannot be the billable owner of a codespace. Therefore:
* A {% data variables.enterprise.prodname_managed_user %} can only create a codespace from a template if the codespace is billed to an organization.
* A {% data variables.enterprise.prodname_managed_user %} cannot publish a codespace created from a template to a new repository.
See [AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users).
{% endif %}
## What happens when users are removed
If a user is removed from an organization or repository, their codespaces are automatically deleted.
* [AUTOTITLE](/codespaces/quickstart)
* [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/enabling-or-disabling-github-codespaces-for-your-organization)
* [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)

View File

@@ -65,7 +65,7 @@ If you try to delete a codespace with unpushed git commits, your editor will not
Codespaces that have been stopped and remain inactive for a specified period of time will be deleted automatically. By default, inactive codespaces are deleted after 30 days, but you can customize your codespace retention period. For more information, see [AUTOTITLE](/codespaces/setting-your-user-preferences/configuring-automatic-deletion-of-your-codespaces).
If you create a codespace, it will continue to accrue storage charges until it is deleted, irrespective of whether it is active or stopped. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage). Deleting a codespace does not reduce the current billable amount for {% data variables.product.prodname_github_codespaces %}, which accumulates during each monthly billing cycle. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
If you create a codespace, it will continue to accrue storage charges until it is deleted, irrespective of whether it is active or stopped. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces). Deleting a codespace does not reduce the current billable amount for {% data variables.product.prodname_github_codespaces %}, which accumulates during each monthly billing cycle. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
For more information on deleting a codespace, see [AUTOTITLE](/codespaces/developing-in-a-codespace/deleting-a-codespace).

View File

@@ -33,7 +33,7 @@ You can set a spending limit for {% data variables.product.prodname_github_codes
You can check the compute and storage usage for {% data variables.product.prodname_github_codespaces %} for the current billing month. For information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage).
> [!NOTE]
> Prebuilds for {% data variables.product.prodname_github_codespaces %} are created and updated using {% data variables.product.prodname_actions %}. This may incur billable costs for {% data variables.product.prodname_actions %}. You can set a spending limit for {% data variables.product.prodname_actions %}. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds) and [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions). Storage of the generated prebuilds is charged at the same rate as your codespaces, and is included in your {% data variables.product.prodname_github_codespaces %} spending limit.
> Prebuilds for {% data variables.product.prodname_github_codespaces %} are created and updated using {% data variables.product.prodname_actions %}. This may incur billable costs for {% data variables.product.prodname_actions %}. You can set a budget for {% data variables.product.prodname_actions %}. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces) and [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions). Storage of the generated prebuilds is charged at the same rate as your codespaces, and is included in your {% data variables.product.prodname_github_codespaces %} budget.
## Disabling or limiting billing for {% data variables.product.prodname_codespaces %}

View File

@@ -16,7 +16,7 @@ product: '{% data reusables.gated-features.codespaces-org %}'
By default, if organization members, or collaborators, are permitted to create codespaces that are billable to your organization, they can create multiple such codespaces. The number of organization-billed codespaces someone can create is governed by a limit to the total number of codespaces that they can create across all repositories they can access. This limit is set by {% data variables.product.company_short %}.
As an organization owner, you can restrict the number of codespaces that each user can create, where the costs of the codespace are billable to the organization. This can help to reduce the overall cost of {% data variables.product.prodname_github_codespaces %} to the organization, as there is a charge for codespace storage. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage).
As an organization owner, you can restrict the number of codespaces that each user can create, where the costs of the codespace are billable to the organization. This can help to reduce the overall cost of {% data variables.product.prodname_github_codespaces %} to the organization, as there is a charge for codespace storage. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces).
To restrict the maximum number of organization-billed codespaces that users can create, you create a policy in the {% data variables.product.prodname_codespaces %} settings for your organization. For example, if you set the maximum to 2, users who already have 2 active or stopped codespaces that are billed to your organization will have to delete one of these before they can create a new codespace that's billed to the organization.

View File

@@ -27,7 +27,7 @@ When prebuilds are available for a particular branch of a repository, a particul
When you create a codespace from a template on the "Your codespaces" page, {% data variables.product.prodname_dotcom %} may automatically use a prebuild to speed up creation time. For more information on templates, see [AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-from-a-template).
> [!NOTE]
> Each prebuild that's created consumes storage space that will either incur a billable charge or, for repositories owned by your personal {% data variables.product.prodname_dotcom %} account, will use some of your monthly included storage. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds).
> Each prebuild that's created consumes storage space that will either incur a billable charge or, for repositories owned by your personal {% data variables.product.prodname_dotcom %} account, will use some of your monthly included storage. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces).
## The prebuild process
@@ -35,7 +35,7 @@ To create a prebuild, you set up a prebuild configuration. When you save the con
When a prebuild configuration workflow runs, {% data variables.product.prodname_dotcom %} creates a temporary codespace, performing setup operations up to and including any `onCreateCommand` and `updateContentCommand` commands in the `devcontainer.json` file. No `postCreateCommand` commands are run during the creation of a prebuild. For more information about these commands, see the [`devcontainer.json` reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties) in the {% data variables.product.prodname_vscode_shortname %} documentation. A snapshot of the generated container is then taken and stored.
As with other {% data variables.product.prodname_actions %} workflows, running a prebuild configuration workflow will either consume some of the {% data variables.product.prodname_actions %} minutes included with your account, if you have any, or it will incur charges for {% data variables.product.prodname_actions %} minutes. Storage of codespace prebuilds is billed in the same way as storage of active or stopped codespaces. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds).
As with other {% data variables.product.prodname_actions %} workflows, running a prebuild configuration workflow will either consume some of the {% data variables.product.prodname_actions %} minutes included with your account, if you have any, or it will incur charges for {% data variables.product.prodname_actions %} minutes. Storage of codespace prebuilds is billed in the same way as storage of active or stopped codespaces. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces).
When you create a codespace from a prebuild, {% data variables.product.prodname_dotcom %} downloads the existing container snapshot from storage and deploys it on a fresh virtual machine, completing the remaining commands specified in the dev container configuration. Since many operations have already been performed, such as cloning the repository, creating a codespace from a prebuild can be substantially quicker than creating one without a prebuild. This is true where the repository is large and/or `onCreateCommand` commands take a long time to run.

View File

@@ -26,7 +26,7 @@ Prebuilds are created using {% data variables.product.prodname_actions %}. As a
You can set up prebuilds in any repository owned by a personal account. The prebuild will consume storage space that will either incur a billable charge or, for repositories owned by your personal account, will use some of your monthly included storage.
> [!NOTE]
> {% data reusables.codespaces.prebuilds-billing-for-forks %} See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#how-billing-is-handled-for-forked-repositories).
> {% data reusables.codespaces.prebuilds-billing-for-forks %} See [AUTOTITLE](/billing/concepts/product-billing/github-codespaces#how-costs-are-assigned-to-a-billable-account).
For repositories owned by an organization, you can set up prebuilds if the organization is on a {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} plan. Additionally, you must have added a payment method and set a spending limit for {% data variables.product.prodname_github_codespaces %} on the organization account or its parent enterprise. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-the-github-codespaces-spending-limit-for-your-organization-account) and [AUTOTITLE](/get-started/learning-about-github/githubs-plans).
@@ -73,7 +73,7 @@ For repositories owned by an organization, you can set up prebuilds if the organ
![Screenshot of the "Region availability" settings. "Reduce prebuild available to only specific regions" is selected with two regions selected.](/assets/images/help/codespaces/prebuilds-regions.png)
> [!NOTE]
> * The prebuild in each region incurs individual storage charges. You should, therefore, only enable prebuilds for regions in which you know they'll be used. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds).
> * The prebuild in each region incurs individual storage charges. You should, therefore, only enable prebuilds for regions in which you know they'll be used.
> * Developers can set their default region for {% data variables.product.prodname_github_codespaces %}, which can allow you to enable prebuilds for fewer regions. See [AUTOTITLE](/codespaces/setting-your-user-preferences/setting-your-default-region-for-github-codespaces).
1. Optionally, under **Template history**, set the number of prebuild versions to be retained. You can input any number between 1 and 5. The default number of saved versions is 2, which means that only the latest prebuild and the previous version are saved.

View File

@@ -125,7 +125,7 @@ If you don't add a dev container configuration to your repository, or if your co
The default configuration is a good option if you're working on a small project that uses the languages and tools that {% data variables.product.prodname_github_codespaces %} provides.
> [!NOTE]
> {% data variables.product.prodname_dotcom %} does not charge for storage of containers built from the default dev container image. For more information about billing for codespace storage, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage). {% data reusables.codespaces.check-for-default-image %}
> {% data variables.product.prodname_dotcom %} does not charge for storage of containers built from the default dev container image. For more information about billing for codespace storage, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces). {% data reusables.codespaces.check-for-default-image %}
## Using a predefined dev container configuration

View File

@@ -23,7 +23,7 @@ To help users find your template and get started quickly, you can share a link t
When someone creates a codespace from your template, the contents of your template repository will be cloned into their codespace. When the user is ready, they will be able to publish their work to a new repository on {% data variables.product.github %} belonging to their personal account. For more information, see [AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-from-a-template).
Organizations can pay for members of the organization and outside collaborators to use {% data variables.product.prodname_github_codespaces %} at the organization's expense. This includes codespaces created from template repositories owned by the organization. However, if a user publishes a codespace created from a template to their personal account, ownership and billing of the codespace transfers to the user who created the codespace. For more information, see [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#how-billing-is-handled-for-github-codespaces-templates).
Organizations can pay for members of the organization and outside collaborators to use {% data variables.product.prodname_github_codespaces %} at the organization's expense. This includes codespaces created from template repositories owned by the organization. However, if a user publishes a codespace created from a template to their personal account, ownership and billing of the codespace transfers to the user who created the codespace. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces#how-costs-are-assigned-to-a-billable-account).
## Describe your template

View File

@@ -67,7 +67,7 @@ You may have a codespace that you want to keep for longer than the retention per
> [!NOTE]
> The "Keep codespace" option is not available for organization-owned codespaces affected by an organization retention policy.
Codespaces incur storage costs, or consume your included storage allowance if the codespace is owned by your personal {% data variables.product.prodname_dotcom %} account. You should therefore be aware of the cost implications of storing codespaces indefinitely. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage).
Codespaces incur storage costs, or consume your included storage allowance if the codespace is owned by your personal {% data variables.product.prodname_dotcom %} account. You should therefore be aware of the cost implications of storing codespaces indefinitely. See [AUTOTITLE](/billing/concepts/product-billing/github-codespaces).
{% data reusables.codespaces.your-codespaces-procedure-step %}
1. To the right of the codespace you want to exempt from automatic deletion, click {% octicon "kebab-horizontal" aria-label="Codespace configuration" %}, then click **{% octicon "bookmark" aria-hidden="true" aria-label="bookmark" %} Keep codespace**.

View File

@@ -48,7 +48,7 @@ Both {% data variables.codespaces.serverless %} and {% data variables.product.pr
|| {% data variables.codespaces.serverless %} | {% data variables.product.prodname_github_codespaces %}|
|-|----------------|---------|
| **Cost** | Free. | Free monthly quota of usage for personal accounts. For information on pricing, see [AUTOTITLE](/free-pro-team@latest/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-github-codespaces-pricing).|
| **Cost** | Free. | Free monthly quota of usage for personal accounts, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces#free-and-billed-use-by-personal-accounts).|
| **Availability** | Available to everyone on GitHub.com. | Available to everyone on GitHub.com. |
| **Start up** | {% data variables.codespaces.serverless %} opens instantly with a key-press and you can start using it right away, without having to wait for additional configuration or installation. | When you create or resume a codespace, the codespace is assigned a VM and the container is configured based on the contents of a `devcontainer.json` file. This set up may take a few minutes to create the environment. See [AUTOTITLE](/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository). |
| **Compute** | There is no associated compute, so you wont be able to build and run your code or use the integrated terminal. | With {% data variables.product.prodname_github_codespaces %}, you get the power of a dedicated VM on which you can run and debug your application.|

View File

@@ -24,7 +24,7 @@ The amount of free usage provided on your personal account every month is design
{% data variables.product.prodname_codespaces %} compute is counted in core hours, which is the sum of the time a codespace is active, multiplied by the multiplier for the codespace's machine type: for example, a multiplier of 2 for a 2-core machine, or a multiplier of 8 for an 8-core machine. A codespace becomes active when you create it or start it. A codespace stops being active when you stop it or delete it, or when it is stopped or deleted automatically.
The default idle timeout, which stops a codespace after a period of inactivity, is 30 minutes. You can reduce this if required. See the "About billing for compute usage" section of [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-compute-usage).
The default idle timeout, which stops a codespace after a period of inactivity, is 30 minutes. You can reduce this if required. See [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)
## About {% data variables.product.prodname_codespaces %} storage
@@ -35,7 +35,7 @@ You can see the storage usage for each of your codespaces on the "Your codespace
> [!NOTE]
> If the dev container for a codespace was built from the default image, the size of the codespace shown on this page does not include the size of the base dev container. Storage for the base dev container is provided free of charge. See [Storage usage for your base dev container](#storage-usage-for-your-base-dev-container).
For billing purposes, {% data variables.product.prodname_codespaces %} storage is counted in GB-months. This is a cumulative measure of the total storage each codespace consumes from creation to deletion, plus the storage for prebuilds. See the "Billing for storage usage" section of [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-storage-usage).
For billing purposes, {% data variables.product.prodname_codespaces %} storage is counted in GB-hours. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces).
### Where did my monthly storage go?
@@ -95,10 +95,10 @@ If the dev container for the current codespace was built from the default image,
> [!NOTE]
> Storage is calculated hourly and added to your existing storage usage. Consumed storage is therefore cumulative for the duration of your month-long billing cycle. This means that, during the billing period, the value you see on your billing page will only increase or remain the same. Usage will be reset to zero when a new billing cycle starts. Deleting a codespace, or a prebuild, will not reduce the usage figure for the current month, but it will reduce the rate at which storage usage accumulates.
* Ensure that you are using prebuilds for only as many versions and as many regions as you need. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds) and [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#about-billing-for-codespaces-prebuilds).
* Ensure that you are using prebuilds for only as many versions and as many regions as you need. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds).
> [!NOTE]
> If your included storage usage is exhausted, new prebuilds are disabled until you set up a spending limit or your included usage quota renews.
> If your included storage usage is exhausted, new prebuilds are disabled until you set up a budget or your included usage quota renews.
* If you have configured prebuilds in a repository's settings, but you're not using {% data variables.product.prodname_github_codespaces %} for that repository, consider deleting the prebuild configuration to avoid prebuilds for that repository consuming your included storage allowance unnecessarily. When you delete a prebuild configuration all the associated prebuilds are deleted, reducing your storage consumption from that point onward. See [AUTOTITLE](/codespaces/prebuilding-your-codespaces/managing-prebuilds#deleting-a-prebuild-configuration).

View File

@@ -5,4 +5,4 @@ You can save your files, close and stop your codespace, and come back to your wo
However, if you delete an unpublished codespace, or if it's automatically deleted by being left unused for the duration of the retention period, then your work will be deleted too. To persist your work, and to allow others to work on your project, you will need to publish your codespace to a repository on {% data variables.product.prodname_dotcom %}.
> [!NOTE]
> If an unpublished codespace is currently billed to an organization, publishing the codespace transfers ownership and billing of the codespace to your personal account. See [AUTOTITLE](/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#how-billing-is-handled-for-github-codespaces-templates).
> If an unpublished codespace is currently billed to an organization, publishing the codespace transfers ownership and billing of the codespace to your personal account. See [AUTOTITLE](/billing/concepts/product-billing/github-codespaces#how-costs-are-assigned-to-a-billable-account).