Step 10: Get developers coding with Copilot
- Who
- Developers
- Hands-on
- ≈ 10 min per person
- Needs
- 9Assign licenses
Have ready
- A Copilot license from step 9
- Each developer’s Entra account
- Your enterprise address
https://SUBDOMAIN.ghe.com
The part of your setup this step touches
Set up the IDE
Section titled “Set up the IDE”-
Open the settings (Ctrl+, or Cmd+,), search for
enterpriseand set Github-enterprise: Uri tohttps://SUBDOMAIN.ghe.com. -
Search for
copilot. Under GitHub › Copilot: Advanced, click Edit in settings.json and make sure these lines are there:"github-enterprise.uri": "https://SUBDOMAIN.ghe.com","github.copilot.advanced": {"authProvider": "github-enterprise"} -
Save. When VS Code asks you to sign in, click Sign in to GitHub and sign in with your Entra account. No prompt? Restart VS Code.
You need the GitHub Copilot plugin 1.4.11 or newer.
-
Open the settings (Ctrl+Alt+S or Cmd+,) and go to Tools › GitHub Copilot.
-
In Authentication Provider, enter
SUBDOMAIN.ghe.comand click OK. -
Click the Copilot Chat icon, then Login to GitHub, and sign in with your Entra account.
-
Open Tools › Options › More Accounts (Visual Studio 2022) or Tools › Options › All Settings › Environment › Accounts (newer versions), and tick Include GitHub Enterprise Cloud and GitHub Enterprise Server accounts.
-
Open File › Account Settings…, click + Add › GitHub and choose GitHub Enterprise.
-
Enter
https://SUBDOMAIN.ghe.com, choose Sign in with your browser and sign in with your Entra account.
-
Open the GitHub Copilot for Xcode app and go to the Advanced tab.
-
Set Auth provider URL to
https://SUBDOMAIN.ghe.com, then sign in.
-
In the Copilot menu, open Edit Preferences….
-
Set GitHub Enterprise Authentication Endpoint to
https://SUBDOMAIN.ghe.comand click Apply. -
In the Copilot menu, click Sign In to GitHub.
Set up the command line
Section titled “Set up the command line”Copilot CLI:
copilot login --host SUBDOMAIN.ghe.comGitHub CLI, for repositories in Path A:
gh auth login --hostname SUBDOMAIN.ghe.comAlso signed in to github.com? gh auth switch toggles between your accounts, and setting GH_HOST to SUBDOMAIN.ghe.com makes your enterprise the default.
Check that it works
Section titled “Check that it works”Open Copilot Chat in the IDE and ask a question, or start typing in a code file and wait for a suggestion. If Copilot answers, you’re done.
Troubleshooting
Section titled “Troubleshooting”The browser opens github.com to sign in
The enterprise address isn’t set, or the IDE hasn’t picked it up. Check the setting for your IDE above, sign out of GitHub in the IDE and sign in again.
Copilot says you don’t have access
Check that you’re in a team with a Copilot license (step 9) and signed in to SUBDOMAIN.ghe.com. Signing out and back in refreshes the license.
Sign-in works, but Copilot never answers
Your proxy or firewall probably blocks your enterprise addresses. Check the list from step 0 and step 5.
Done when…
Section titled “Done when…”- Developers sign in to
SUBDOMAIN.ghe.com, not to github.com. - Copilot answers in their IDE or CLI.