Skip to main content

Managing your spending limit for GitHub Packages

You can set a spending limit for GitHub Packages usage.

谁可以使用此功能?

GitHub Packages 适用于 GitHub Free、GitHub Pro、面向组织的 GitHub Free、GitHub Team、GitHub Enterprise Cloud、GitHub Enterprise Server 3.0 或更高版本。
GitHub Packages 不适用于使用旧版按仓库计划的帐户所拥有的私有仓库。 此外,使用旧版按存储库计划的帐户无法访问支持精细权限的注册表,因为这些帐户按存储库计费。 有关支持精细权限的注册表的列表,请参阅“关于 GitHub Packages 的权限”。 有关详细信息,请参阅“GitHub 的计划”。

About spending limits for GitHub Packages

公共包免费使用 GitHub Packages。 对于专用包,GitHub 上的每个帐户都可获得一定数量的免费存储和数据传输,具体取决于帐户计划。 超出包含数量的任何使用量都由支出限制控制。

如果您是每月付费的用户,您的帐户默认支出限额为 0 美元,这将防止您在达到包含的限额后额外使用存储或数据传输。 如果按发票支付帐户费用,则帐户将具有无限制的默认支出限制。

您可以设置特定的支出限额,或者对某些帐户允许无限制的支出。 支出限制适用于 GitHub Packages 和 GitHub Actions 的组合超额(任何超出计划额度的使用量)。 For more information about pricing for GitHub Packages usage, see "About billing for GitHub Packages."

If you are an organization owner, you can connect an Azure Subscription ID to your organization account to enable and pay for GitHub Packages usage beyond the amounts including with your account. For more information, see "连接 Azure 订阅."

As soon as you set a spending limit other than $0, you will be responsible for any existing overages in the current billing period. For example, if your organization uses GitHub Team, does not allow overages, and publishes a new version of a private package that increases your storage usage for the month from 1.9GB to 2.1GB, publishing the version will use slightly more than the 2GB your product includes.

Because you have not enabled overages, your next attempt to publish a version of the package will fail. You will not receive a bill for the 0.1GB overage that month. However, if you enable overages, your first bill will include the 0.1GB of existing overage for the current billing cycle, as well as any additional overages you accrue.

Managing the spending limit for GitHub Packages for your personal account

Anyone can manage the spending limit for GitHub Packages for their own personal account.

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

  2. 在侧边栏的“访问”部分,单击“ 计费和计划”,然后单击“计划和使用情况” 。

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

    “账单设置”页的“摘要”部分的屏幕截图。 右侧以深橙色边框突出显示了“管理支出限制”。

  4. 向下滚动到“操作和包”,选择限制支出或允许无限制支出。

  5. 根据选择的选项,单击“更新限制”或“更新为无限制”。

Managing the spending limit for GitHub Packages for your organization

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

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

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

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

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

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

    “账单设置”页的“摘要”部分的屏幕截图。 右侧以深橙色边框突出显示了“管理支出限制”。

  6. Under "Monthly spending limit", choose to limit spending or allow unlimited spending.

    Note: If GitHub Codespaces is enabled for your organization, scroll to "Actions & Packages", then choose to limit spending or allow unlimited spending.

  7. 根据选择的选项,单击“更新限制”或“更新为无限制”。

Managing usage and spending limit email notifications

当支出达到帐户包含使用量的 75%、90% 和 100% 以及支出达到帐户支出限制的 75%、90% 和 100% 时,系统将向帐户所有者和计费管理员发送电子邮件通知。

可以随时通过导航到“支出限制”页底部的“电子邮件警报”部分来禁用这些通知。