Skip to content

Commit db3965d

Browse files
authored
Add instructions for using multiple GH accounts (#9072)
* Add instructions for using multiple GH accounts * Update screenshots * Add section for GHE * Remove leftover text
1 parent c03bfb8 commit db3965d

File tree

3 files changed

+47
-8
lines changed

3 files changed

+47
-8
lines changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

docs/copilot/setup.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ There are different ways to get access to GitHub Copilot:
2424

2525
To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You can set up Copilot directly from within VS Code.
2626

27-
1. Hover over the Copilot icon in the Status Bar and select **Set up Copilot**.
27+
1. Hover over the Copilot icon in the Status Bar and select **Use AI Features**.
2828

2929
![Hover over the Copilot icon in the Status Bar and select Set up Copilot.](images/setup/setup-copilot-status-bar.png)
3030

@@ -37,6 +37,16 @@ To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You
3737
3838
1. You can now start using Copilot in VS Code. Learn the basics with the [Copilot Quickstart](/docs/copilot/getting-started.md).
3939

40+
## Use Copilot with a GHE account
41+
42+
If your Copilot subscription is associated with a GitHub Enterprise (GHE) account, you can sign in to Copilot in VS Code with your GHE credentials.
43+
44+
1. If you haven't already, hover over the Copilot icon in the Status Bar and select **Use AI Features**.
45+
46+
1. In the sign in dialog, choose **Continue with GHE.com** and provide your GHE instance URL and credentials.
47+
48+
If you need to switch between a GitHub.com account and a GHE account, see [Use a different GitHub account per workspace or profile](#use-a-different-github-account-per-workspace-or-profile) for instructions.
49+
4050
## Use a different GitHub account with Copilot
4151

4252
If your Copilot subscription is associated with another GitHub account, follow these steps to sign out of your GitHub account in VS Code, and sign in with another account.
@@ -47,15 +57,44 @@ If your Copilot subscription is associated with another GitHub account, follow t
4757

4858
1. Sign in to your GitHub account using any of the following methods:
4959

50-
- Select **Sign in to use Copilot** from the Copilot menu in the Status Bar.
60+
* Select **Sign in to use Copilot** from the Copilot menu in the Status Bar.
5161

5262
![Sign in to use Copilot from the Copilot status menu.](images/setup/copilot-signedout-sign-in.png)
5363

54-
- Select the **Accounts** menu in the Activity Bar, and then select **Sign in with GitHub to use GitHub Copilot**.
64+
* Select the **Accounts** menu in the Activity Bar, and then select **Sign in with GitHub to use GitHub Copilot**.
5565

5666
![Accounts menu in VS Code, showing the option to sign in with GitHub to use GitHub Copilot.](images/setup/vscode-accounts-menu.png)
5767

58-
- Run the **GitHub Copilot: Sign in** command in the Command Palette (`kb(workbench.action.showCommands)`).
68+
* Run the **GitHub Copilot: Sign in** command in the Command Palette (`kb(workbench.action.showCommands)`).
69+
70+
## Use a different GitHub account per workspace or profile
71+
72+
You can use different GitHub accounts for Copilot per VS Code workspace or profile. This is useful if you use Copilot with different accounts for work and personal projects, or if you want to use different accounts for different extensions that use GitHub authentication.
73+
74+
Follow these steps to configure which GitHub account to use for Copilot. This configuration is saved per workspace and per profile.
75+
76+
* For GitHub.com accounts:
77+
78+
1. In the Accounts menu in the Activity Bar, select **Manage Extension Account Preferences**
79+
1. Select **GitHub Copilot Chat** from the list of extensions
80+
1. Choose the GitHub account you want to use for Copilot in the current workspace and profile
81+
82+
* For GHE.com accounts:
83+
84+
> [!TIP]
85+
> If you only want to use a GHE account for Copilot, follow the steps in [Use Copilot with a GHE account](#use-copilot-with-a-ghe-account) to sign in with your GHE account.
86+
87+
1. Run **Preferences: Open User Settings (JSON)** or **Preferences: Open Workspace Settings (JSON)** from the Command Palette (`kb(workbench.action.showCommands)`)
88+
89+
1. Add the following setting to specify GitHub Enterprise as the authentication provider for Copilot:
90+
91+
```json
92+
"github.copilot.advanced": {
93+
"authProvider": "github-enterprise"
94+
}
95+
```
96+
97+
1. Re-sign in to your GitHub Enterprise account if you're not already signed in
5998

6099
## Remove AI features from VS Code
61100

0 commit comments

Comments
 (0)