Codespaces 定价
Codespaces 的使用将针对团队和企业计划中的所有帐户计费,并且不包括任何权利。 个人帐户目前不为 Codespaces 使用付费。
Codespaces 使用按下表中的计量单位计费:
| 产品 | SKU | 计量单位 | 价格 |
|---|---|---|---|
| Codespaces 计算 | 2 个内核 | 1 小时 | $0.18 |
| 4 个内核 | 1 小时 | $0.36 | |
| 8 个内核 | 1 小时 | $0.72 | |
| 16 个内核 | 1 小时 | $1.44 | |
| 32 个内核 | 1 小时 | $2.88 | |
| Codespaces 存储 | 存储器 | 1 GB-月 | $0.07 |
关于 Codespaces 的计费
Codespaces are billed in US dollars (USD) according to their compute and storage usage.
Calculating compute usage
Compute usage is defined as the total number of uptime minutes for which a Codespaces instance is active. Compute usage is calculated by summing 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 automatically after a developer specified 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。
您的 Codespaces 使用将共用帐户的现有计费日期、付款方式和收据。 To view all the subscriptions for your account on GitHub.com, see "Viewing your subscriptions and billing date."
To estimate the costs for consumptive services, you can use the GitHub pricing calculator. For more information, go to https://github.com/pricing/calculator.
Codespaces 预构建的计费
Note: The ability to prebuild codespaces is currently in beta and subject to change.
A GitHub Actions workflow is triggered every time you create or update a prebuild template, or push to a prebuild-enabled branch. As with other workflows, while prebuild workflows are running they will either consume some of the Actions minutes included with your account, if you have any, or they will incur charges for Actions minutes. For more information about pricing for Actions minutes, see "About billing for GitHub Actions."
If you are an organization owner, you can track usage of prebuild workflows by downloading a GitHub Actions usage report for your organization. You can identify workflow runs for prebuilds by filtering the CSV output to only include the workflow called "Create Codespaces Prebuilds." 更多信息请参阅“查看 GitHub Actions 使用情况”。
While Codespaces prebuilds is in beta there is no charge for storage of templates. When prebuilds become generally available, you will be billed for storing prebuild templates for each prebuild configuration in each region selected for that configuration.
设置支出限制
Note: You must set a spending limit before you can use Codespaces.
By default, your organization or enterprise will have a 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.
有关管理和更改帐户支出限制的信息,请参阅“管理 Codespaces 的支出限制”。
If you hit a spending limit, you will no longer be able to create or resume your codespaces. You can still export any work in progress changes to a new branch.
限制机器类型的选择
用户在创建代码空间时选择的计算机类型会影响该代码空间的每分钟费用,如上所示。
组织所有者可以创建策略来限制用户可用的计算机类型。 For more information, see "Restricting access to machine types."
如何处理复刻的存储库的计费
Codespaces 只能在定义了计费所有者的组织中使用。 要对组织收费,用户必须是成员或协作者,否则他们无法创建代码空间。
例如,私有组织中的用户可以复刻该组织内的存储库,随后可以使用向组织计费的代码空间;这是因为组织是父存储库的所有者,父存储库可以删除用户的访问权限、复刻的存储库和代码空间。
传输存储库时如何处理计费
使用每小时计费和报告。 因此,当存储库位于您的组织内时,您需要为任何使用付费。 将存储库移出组织时,该存储库中的所有代码空间都将作为传输过程的一部分被删除。
移除用户后会发生什么情况
如果从组织或存储库中移除用户,则会自动删除其代码空间。