Set up GitHub Copilot in VS Code
This guide walks you through setting up GitHub Copilot in Visual Studio Code. To use Copilot in VS Code, you need to have access to GitHub Copilot with your GitHub account.
If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for theCopilot Free plan and get a monthly limit of inline suggestions and chat interactions.
Get access to GitHub Copilot
There are different ways to get access to GitHub Copilot:
| Type of User | Description |
|---|---|
| Individual |
|
| Organization/Enterprise member |
|
Set up Copilot in VS Code
To use Copilot in VS Code, you need access to a GitHub Copilot subscription. You can set up Copilot directly from within VS Code.
Hover over the Copilot icon in the Status Bar and selectUse AI Features.

Choose a sign-in method and follow the prompts. If you don't have a Copilot subscription yet, you'll be signed up for theCopilot Free plan.
ImportantTelemetry in your free version of GitHub Copilot is currently enabled. By default, code suggestions that match public code, including code references in the VS Code andgithub.com experience, are allowed. You can opt out of telemetry data collection by disabling telemetry in VS Code by settingtelemetry.telemetryLevel to
off, or you can adjust both telemetry and code suggestion settings inCopilot Settings.You can now start using Copilot in VS Code. Learn the basics with theCopilot Quickstart.
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.
If you haven't already, hover over the Copilot icon in the Status Bar and selectUse AI Features.
In the sign in dialog, chooseContinue 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, seeUse 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.
Select theAccounts menu in the Activity Bar, and then selectSign out for the account you're currently signed in with.

Sign in to your GitHub account using any of the following methods:
SelectSign in to use Copilot from the Copilot menu in the Status Bar.

Select theAccounts menu in the Activity Bar, and then selectSign in with GitHub to use GitHub Copilot.

Run theGitHub Copilot: Sign in command in the Command Palette (⇧⌘P (Windows, LinuxCtrl+Shift+P)).
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:
- In the Accounts menu in the Activity Bar, selectManage Extension Account Preferences
- SelectGitHub Copilot Chat from the list of extensions
- Choose the GitHub account you want to use for Copilot in the current workspace and profile
For GHE.com accounts:
TipIf you only want to use a GHE account for Copilot, follow the steps inUse Copilot with a GHE account to sign in with your GHE account.
RunPreferences: Open User Settings (JSON) orPreferences: Open Workspace Settings (JSON) from the Command Palette (⇧⌘P (Windows, LinuxCtrl+Shift+P))
Add the following setting to specify GitHub Enterprise as the authentication provider for Copilot:
"github.copilot.advanced": { "authProvider":"github-enterprise"}Re-sign in to your GitHub Enterprise account if you're not already signed in
Remove AI features from VS Code
You can disable the built-in AI features in VS Code with thechat.disableAIFeatures setting, similar to how you configure other features in VS Code. This disables and hides features like chat or inline suggestions in VS Code and disables the Copilot extensions. You can configure the setting at the workspace or user level.
Alternatively, use theLearn How to Hide AI Features action from the Chat menu in the title bar to access the setting.
If you have previously disabled the built-in AI features, your choice is respected upon updating to a new version of VS Code.
Disable AI features for a workspace
To disable AI features for a specific workspace, configure thechat.disableAIFeatures setting in workspace settings. This setting is available in the Settings editor (⌘, (Windows, LinuxCtrl+,)), or you can edit thesettings.json file in the workspace.
Next steps
- Continue with theQuickstart for using AI to discover the key features for AI-powered development in VS Code.