Skip to main content

Managing spending limits for GitHub Codespaces

You can set a spending limit for GitHub Codespaces usage.

GitHub Codespaces 可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 GitHub Codespaces 也可作为受限的 beta 版本提供给使用 GitHub Free 和 GitHub Pro 计划的个人用户。 有关详细信息,请参阅“GitHub 的产品”。

About spending limits for GitHub Codespaces

Note: You must set a non-zero spending limit before you can use GitHub Codespaces.

By default, your organization or enterprise will have a 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.


Once you've reached your spending limit, your organization or repository will no longer be able to create new codespaces, and won't be able to start existing codespaces. Any existing codespaces that are still running will not be shutdown; if you don't change the spending limit, you will not be charged for the amount that exceeds the limit.

For more information about pricing for GitHub Codespaces usage, see "About billing for GitHub Codespaces."

Managing the spending limit for Codespaces for your organization

Organizations owners and billing managers can manage the spending limit for GitHub Codespaces for an organization.

  1. 在任何页面的右上角,单击个人资料照片,然后单击“设置”。

    用户栏中的 Settings 图标

  2. 在边栏的“访问”部分,单击“ 组织”。

  3. 在组织旁边,单击“设置”。 设置按钮

  4. 如果你是组织所有者,请在侧边栏的“访问”部分,单击“ 计费和计划”。

  5. 在页面顶部的“付款信息”下,单击“管理支出限制”。 管理支出限制链接

  6. 在“每月支出限制”下,向下滚动至“Codespaces”并选择限制支出或允许无限制支出。 用于限制支出或允许无限制支出的单选按钮

  7. 如果选择限制支出,请在“限制支出”下键入一个限制,然后单击“更新限制”。 用于键入支出限制的字段和“更新限制”按钮

Exporting changes when you have reached your spending limit

如果达到支出限制,你将无法再创建或恢复 codespace。 你仍然可以将任何正在进行的更改导出到新分支

Managing usage and spending limit email notifications

Email notifications are sent to account owners and billing managers when spending reaches 50%, 75%, 90%, and 100% of your account's spending limit.

You can disable these notifications anytime by navigating to the bottom of the Spending Limit page.

Screenshot of the billing email notification settings

Further reading