Skip to content
FunCoding

Search

Search docs, Skills and MCP

GHE.com 企业账号登录

为 VS Code、JetBrains、Visual Studio、Xcode、Eclipse 与 CLI 配置企业认证地址。

This page has not been translated into English yet. The original Chinese version is shown below.

通过 GHE.com 企业拥有的 managed user account 获得 Copilot 时,应登录持有 Copilot 许可证的企业账号,并在认证前配置对应主机。各客户端字段接受的格式不同:JetBrains 使用主机名,多个图形客户端使用完整 HTTPS URL。

VS Code

  1. 打开 Settings,搜索 enterprise。
  2. 将 Github-enterprise: Uri 设为企业地址,例如 https://octocorp.ghe.com。
  3. 搜索 copilot,在 GitHub > Copilot: Advanced 选择 Edit in settings.json。
  4. 在现有设置中加入下列属性并保存。
{
  "github.copilot.advanced": {
    "authProvider": "github-enterprise"
  }
}

按弹出的登录提示授权企业账号;没有提示时重启 VS Code。切回 GitHub.com 账号时,删除 authProvider 设置。

JetBrains

Copilot 扩展需要 1.4.11 或更新版本。打开 Settings → Tools → GitHub Copilot → General,在 Authentication Provider 输入 octocorp.ghe.com,这里不加 https://。保存后按提示登录。

也可通过状态栏 Copilot Chat 图标进入 Login to GitHub。切回 GitHub.com 时清空 Authentication Provider 字段。

其他编辑器

编辑器配置入口示例值与后续动作
XcodeGitHub Copilot for Xcode 应用 → Advanced → Auth provider URLhttps://octocorp.ghe.com,再完成扩展登录
Visual Studio添加 GitHub Enterprise 账号时的 GitHub Enterprise URLhttps://octocorp.ghe.com,把账号加入 Visual Studio 账号管理
EclipseCopilot → Edit Preferences... → GitHub Enterprise Authentication Endpointhttps://octocorp.ghe.com,Apply 后再选择 Sign In to GitHub

这些步骤专门针对 GHE.com 托管账号。不能仅凭字段名称就推断任意 GitHub Enterprise Server 部署也具有相同 Copilot 支持范围。

命令行

已安装 Copilot CLI 后,用实际企业子域替换占位符:

copilot login --host SUBDOMAIN.ghe.com

CLI 的多账号、令牌优先级与普通 OAuth 流程另见认证与配置。