Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/copilot/images/setup/setup-copilot-sign-in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/copilot/images/setup/setup-copilot-status-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 43 additions & 4 deletions docs/copilot/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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.
Expand All @@ -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)`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what we wanna call out here.

One thing I notice is that this is the first and only reference to signing in to GHE.com in this doc which makes me worried that for folks who want to sign in with their GHE.com account will set this instead of going through the normal flow (Continue with GHE.com)

Image

NOTE: this sets that setting but at the user level

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. I'll make sure to clarify this more.


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

Expand Down
Loading