diff --git a/docs/copilot/images/setup/setup-copilot-sign-in.png b/docs/copilot/images/setup/setup-copilot-sign-in.png index 193be23d41..0290b328fe 100644 --- a/docs/copilot/images/setup/setup-copilot-sign-in.png +++ b/docs/copilot/images/setup/setup-copilot-sign-in.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e13e6f0d53775ca08e2c433a3927a729ff60d69a43e35e55d17a167cc619b9cf -size 107627 +oid sha256:34a313cd4d11a5fbad2244b86e3ddc1a7b1fb581335ec3ed8fcd55a118a1545e +size 113605 diff --git a/docs/copilot/images/setup/setup-copilot-status-bar.png b/docs/copilot/images/setup/setup-copilot-status-bar.png index b50f895640..fa35e4b8ec 100644 --- a/docs/copilot/images/setup/setup-copilot-status-bar.png +++ b/docs/copilot/images/setup/setup-copilot-status-bar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f84060a47455c22a5fcb7cd7df11f32abe3933e244d355a1badf1038103e3b1c -size 53086 +oid sha256:31261fdd4e7f4cc9bfe1215193786cb4e0f2a010097088f48aa99eead2fb3a50 +size 42797 diff --git a/docs/copilot/setup.md b/docs/copilot/setup.md index d601d1e03c..662470dd15 100644 --- a/docs/copilot/setup.md +++ b/docs/copilot/setup.md @@ -24,7 +24,7 @@ There are different ways to get access to GitHub Copilot: To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You can set up Copilot directly from within VS Code. -1. Hover over the Copilot icon in the Status Bar and select **Set up Copilot**. +1. Hover over the Copilot icon in the Status Bar and select **Use AI Features**. ![Hover over the Copilot icon in the Status Bar and select Set up Copilot.](images/setup/setup-copilot-status-bar.png) @@ -37,6 +37,16 @@ To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You 1. You can now start using Copilot in VS Code. Learn the basics with the [Copilot Quickstart](/docs/copilot/getting-started.md). +## Use Copilot with a GHE account + +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. + +1. If you haven't already, hover over the Copilot icon in the Status Bar and select **Use AI Features**. + +1. In the sign in dialog, choose **Continue with GHE.com** and provide your GHE instance URL and credentials. + +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. + ## Use a different GitHub account with Copilot 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 1. Sign in to your GitHub account using any of the following methods: - - Select **Sign in to use Copilot** from the Copilot menu in the Status Bar. + * Select **Sign in to use Copilot** from the Copilot menu in the Status Bar. ![Sign in to use Copilot from the Copilot status menu.](images/setup/copilot-signedout-sign-in.png) - - Select the **Accounts** menu in the Activity Bar, and then select **Sign in with GitHub to use GitHub Copilot**. + * Select the **Accounts** menu in the Activity Bar, and then select **Sign in with GitHub to use GitHub Copilot**. ![Accounts menu in VS Code, showing the option to sign in with GitHub to use GitHub Copilot.](images/setup/vscode-accounts-menu.png) - - Run the **GitHub Copilot: Sign in** command in the Command Palette (`kb(workbench.action.showCommands)`). + * Run the **GitHub Copilot: Sign in** command in the Command Palette (`kb(workbench.action.showCommands)`). + +## Use a different GitHub account per workspace or profile + +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. + +Follow these steps to configure which GitHub account to use for Copilot. This configuration is saved per workspace and per profile. + +* For GitHub.com accounts: + + 1. In the Accounts menu in the Activity Bar, select **Manage Extension Account Preferences** + 1. Select **GitHub Copilot Chat** from the list of extensions + 1. Choose the GitHub account you want to use for Copilot in the current workspace and profile + +* For GHE.com accounts: + + > [!TIP] + > 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. + + 1. Run **Preferences: Open User Settings (JSON)** or **Preferences: Open Workspace Settings (JSON)** from the Command Palette (`kb(workbench.action.showCommands)`) + + 1. Add the following setting to specify GitHub Enterprise as the authentication provider for Copilot: + + ```json + "github.copilot.advanced": { + "authProvider": "github-enterprise" + } + ``` + + 1. Re-sign in to your GitHub Enterprise account if you're not already signed in ## Remove AI features from VS Code