Managing billing for Codespaces in your organization

You can check your Codespaces usage and set usage limits.

To manage billing for Codespaces for an organization, you must be an organization owner or a billing manager.

代码空间可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 更多信息请参阅“GitHub 的产品”。

概览

To learn about pricing for Codespaces, see "Codespaces pricing."

Codespaces are billed in US dollars (USD) according to their compute and storage usage.

Calculating compute usage

The total number of uptime minutes for which the Codespaces instances are active. Compute usage is calculated by the actual number of minutes used by all codespaces. These totals are reported to the billing service daily, and are billed monthly.

Uptime is controlled by stopping your codespace which can be done manually or based on period of inactivity. For more information, see "Closing or stopping your codespace".

Calculating storage usage

For Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes any files used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and are billed monthly. 到月底,GitHub 会将您的存储量舍入到最接近的 MB。

使用限制

You can set a usage limit for the codespaces in your organization or repository. This limit is applied to the compute and storage usage for Codespaces:

  • Compute minutes: Compute usage is calculated by the actual number of minutes used by all Codespaces instances while they are active. These totals are reported to the billing service daily, and is billed monthly. You can set a spending limit for Codespaces usage in your organization. For more information, see "Managing spending limits for Codespaces."

  • Storage usage: For Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes all used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and is billed monthly. 到月底,GitHub 会将您的存储量舍入到最接近的 MB。 To check how many compute minutes and storage GB have been used by Codespaces, see "Viewing your Codespaces usage"."

Disabling or limiting Codespaces

You can disable the use of Codespaces in your organization or repository. For more information, see "Managing repository access for your organization's codespaces."

You can also limit the individual users who can use Codespaces. For more information, see "Managing user permissions for your organization."

Deleting unused codespaces

Your users can delete their codespaces in https://github.com/codespaces and from within Visual Studio Code. To reduce the size of a codespace, users can manually delete files using the terminal or from within Visual Studio Code.

注意:只有创建代码空间的人才能将其删除。 目前,组织所有者无法删除其组织内创建的代码空间。

此文档对您有帮助吗?

隐私政策

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或者, 了解如何参与。