Knowledge File / AI技能杠杆
Copilot CLI 在 GitHub Actions 中不再需要个人访问令牌
GitHub Actions 现已支持使用内置 GITHUB_TOKEN 运行 Copilot CLI,无需创建和管理个人访问令牌,降低安全风险,并实现组织级计费。
SOURCE / AI技能杠杆
MIN / 9
ACCESS / 会员
POST / 2026-07-03 04:25:32
原贴
查看原文原文
You can now run GitHub Copilot CLI in GitHub Actions using the built-in GITHUB_TOKEN . This means that you no longer need to create and store a personal access token (PAT), eliminating the operational and security risks of managing long-lived PATs for automations at scale. When you run Copilot CLI with the Actions token in an organization-owned repository, AI credits consumed by the CLI are billed directly to the organization. In order to use this feature, you must enable the “Allow use of Copilot CLI billed to the organization” Copilot policy. This is enabled by default if you have the existing “Copilot CLI” policy enabled. Once enabled, workflows just need the copilot-requests: write permission and can authenticate with the workflow’s built-in GITHUB_TOKEN . No additional secrets are required. To learn more, see “Using Copilot CLI in GitHub Actions with GITHUB_TOKEN” in the GitHub Docs. Note: You must be on a recent version of Copilot CLI. Update with copilot update , or reinstall the latest version with npm install -g @github/copilot . Note: You must be on a recent version of Copilot CLI. Update with copilot update , or reinstall the latest version with npm install -g @github/copilot . User-level budgets are not considered when billing directly to the organization because the cost is not attributed to a user. There are multiple ways to manage spend when using this billing method: Configure cost centers for the relevant organizations. Cost centers allow cost attribution to groups of organizations, and budgets can be applied to cost centers. Monitor Copilot usage from your organization’s billing and usage dashboards to track consumption over time. Set a session limit to configure a maximum amount of AI credits that will be used by a workflow.
中文翻译
你现在可以使用内置的 GITHUB_TOKEN 在 GitHub Actions 中运行 GitHub Copilot CLI。这意味着你不再需要创建和存储个人访问令牌(PAT),消除了大规模自动化管理中管理长期 PAT 的操作和安全风险。当你在组织拥有的仓库中使用 Actions 令牌运行 Copilot CLI 时,CLI 消耗的 AI 信用直接向组织计费。要使用此功能,你必须启用“Allow use of Copilot CLI billed to the organization”Copilot 策略。如果你已有“Copilot CLI”策略启用,则默认启用。启用后,工作流只需要 copilot-requests: write 权限,并可以使用工作流的内置 GITHUB_TOKEN 进行身份验证。无需其他密钥。要了解更多信息,请参阅 GitHub Docs 中的“Using Copilot CLI in GitHub Actions with GITHUB_TOKEN”。注意:你必须使用最新版本的 Copilot CLI。使用 copilot update 更新,或使用 npm install -g @github/copilot 重新安装最新版本。注意:你必须使用最新版本的 Copilot CLI。使用 copilot update 更新,或使用 npm install -g @github/copilot 重新安装最新版本。当直接向组织计费时,不考虑用户级别的预算,因为成本不归属于用户。使用此计费方法时,有多种方式管理支出:为相关组织配置成本中心。成本中心允许将成本归因于组织组,并且可以将预算应用于成本中心。从组织的计费和使用情况仪表板监控 Copilot 使用情况,以跟踪随时间推移的消耗。设置会话限制,以配置工作流将使用的最大 AI 信用量。
核心信息
GitHub Actions 现已支持使用内置 GITHUB_TOKEN 运行 Copilot CLI,无需创建和管理个人访问令牌,降低安全风险,并实现组织级计费。
- GitHub Actions 现已支持使用内置 GITHUB_TOKEN 运行 Copilot CLI,无需创建和管理个人访问令牌,降低安全风险,并实现组织级计费。
- 原贴提到:You can now run GitHub Copilot CLI in GitHub Actions using the built-in
- 来源:github.blog
试看内容
成为会员查看完整内容
你已经看到了这篇内容的前置整理,剩余深度部分仅对会员开放。
详细解读
信息差价值
参考来源
成为会员查看完整内容