github / github/copilot-cli

Feature: enterprise/org server-managed settings (incl. `env`) for the local Copilot CLI

未关闭
#3,909 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:configuration area:enterprise
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Problem
Org admins have no way to centrally push configuration — especially environment variables — to developers' **local** Copilot CLI installs. Today the only org-managed env mechanism is **Agents/Codespaces secrets**, which only reach GitHub-hosted **cloud** environments. For the local CLI (incl. VS Code dev containers on Colima/Lima/Podman), the only options are MDM-placed files or per-host provisioning — neither of which reaches into an unmanaged container.

### Request
A server-delivered, org/enterprise-managed settings layer for the local Copilot CLI — fetched at auth and refreshed periodically, taking precedence over user/repo settings — that can set a managed `env` block, e.g.:

```jsonc
// org-managed settings (delivered over the network, not a local file)
{ "env": { "MY_ORG_CONFIG_VALUE": "…" } }
```

These vars would apply to CLI sessions (and ideally subprocesses/plugin hooks), so org-distributed plugins/tools can pick up required config with **no MDM and no per-machine provisioning**.

### Why existing mechanisms don't cover it
- **Agents/Codespaces secrets** → cloud agent / Codespaces only; never reach the local CLI.
- **Org/enterprise policies** (#1971) → governance (enable/disable, model & MCP allowlists), not arbitrary config/secret delivery.
- **`.env` loading** (#2879) → local files the developer manages, not org-pushed.

### Prior art
Claude Code ships exactly this as **server-managed settings** (admin console → delivered at auth, refreshed hourly, reaches inside containers, supports an `env` block) — see code.claude.com/docs server-managed-settings. Enterprise-managed *models* already landed for Copilot CLI (#3730), so an enterprise-managed *settings/env* layer is a natural extension. Would also complement the Claude-parity work in #2471.

贡献指南

打开贡献指南

调研方向

未指定实现文件或测试。首先检查 #3730 中现有的 enterprise-managed models 工作,以及相关的设置、策略和 .env issues(#1971 和 #2879),然后对比引用的 server-managed-settings 先例;完成的标准是就经过身份验证的交付、刷新、优先级和受管理 env 的行为达成一致的设计。

由索引模型根据 Issue 内容生成。

评估

领域
authentication, cli, cloud
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。