Skip to main content

通过 GHE.com 上的帐户使用 GitHub Copilot

更新开发环境,以访问 GHE.com 上帐户的 Copilot 订阅。

To use GitHub Copilot in an IDE or the command line, you must authenticate to an account on GitHub that has a Copilot license.

If you receive access to Copilot through a managed user account owned by an enterprise on GHE.com, you may need to adjust some settings in your IDE before you can authenticate to your account.

Use the tabs at the top of this article to see instructions for your environment.

Authenticating from JetBrains IDEs

To authenticate to GHE.com in a JetBrains editor, you must install version 1.4.11 or later of the Copilot extension. You must then configure the extension to work with GHE.com.

  1. To open the editor preferences or settings dialog, press Command+, (Mac) or Ctrl+Alt+S (Windows).
  2. In the left sidebar, expand the "Languages & Frameworks" section, then click GitHub Copilot.
  3. In the "Authentication Provider" field, enter the hostname where you access GitHub. For example: octocorp.ghe.com.
  4. To save your changes, click OK.
  5. To sign in, open the Tools menu, then select GitHub Copilot > Login to GitHub. Follow the prompts to sign in.

If you ever need to switch to an account on GitHub.com, remove the value you entered in the "Authentication Provider" field.