Skip to main content

Использование GitHub Copilot с учетной записью в GHE.com

Обновите среду разработки, чтобы получить доступ к подписке Copilot для учетной записи на GHE.com.

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 the command line

To use the gh-copilot extension for the GitHub CLI, you must:

  1. Download and install the extension. To do this, you must be authenticated to an account on GitHub.com. See Installing GitHub Copilot in the CLI.
  2. Authenticate to the account on GHE.com where you receive your Copilot license.

GitHub.com is the default destination of GitHub CLI requests. To use gh copilot, you must ensure requests are sent to GHE.com, where you receive your license. You have the following options:

  • Include the flag --hostname SUBDOMAIN.ghe.com in all gh copilot commands.
  • Set the GH_HOST environment variable to change the default host for all GitHub CLI commands.
  • Sign out of GitHub.com with gh auth logout. However, you will need to sign back in to get updates to gh-copilot.

For general information on using the GitHub CLI across platforms, see Using the GitHub CLI across GitHub platforms.