GUIDES Apr 19, 2026 9 min read

GitHub Copilot Setup in VS Code: Complete Step-by-Step Guide

TL;DR Install the GitHub Copilot extension from the VS Code marketplace and sign in with your GitHub account. Free tier gives limited completions; Individual ($10/mo), Business ($19/mo), and Enterprise ($39/mo)…

by Bugi 9 min
TL;DR

  • Install the GitHub Copilot extension from the VS Code marketplace and sign in with your GitHub account.
  • Free tier gives limited completions; Individual ($10/mo), Business ($19/mo), and Enterprise ($39/mo) unlock full access.
  • Core shortcuts: Tab to accept, Esc to dismiss, Ctrl + I to open inline chat.

Overview

GitHub Copilot is an AI pair-programming tool that provides real-time code suggestions directly inside VS Code. It generates single-line completions, multi-line blocks, and entire functions based on your current file context, open tabs, and natural-language comments.

This guide covers the full setup process: installing the extension, authenticating your GitHub account, configuring settings, and learning the keyboard shortcuts that make Copilot productive. It applies to all Copilot tiers — Free, Individual, Business, and Enterprise.

GitHub Copilot · quick reference
Vendor
GitHub (Microsoft)
Platforms
VS Code, JetBrains, Neovim, Visual Studio
Pricing
Free (limited) · Individual $10/mo · Business $19/mo · Enterprise $39/mo
Extension ID
GitHub.copilot

Prerequisites

Before installing, confirm you have the following:

  • VS Code version 1.90 or later. Run code --version in your terminal to check. Update from the VS Code download page if needed.
  • A GitHub account. Any tier works — the Free plan includes limited completions and chat interactions per month.
  • An active Copilot subscription (or willingness to use the Free tier). Organization admins assign Business/Enterprise seats through GitHub settings.
  • Internet connection. Copilot sends prompts to GitHub’s servers for inference. There is no offline mode.

No specific OS requirement — Windows, macOS, and Linux are all supported.

Step 1: Install the Copilot Extension

1
Open the Extensions panel
Press Ctrl + Shift + X (macOS: + Shift + X).
2
Search for “GitHub Copilot”
Look for the extension published by GitHub with the ID GitHub.copilot.
3
Click Install
This also installs GitHub Copilot Chat as a bundled dependency.

Alternatively, install from the command line:

code --install-extension GitHub.copilot

After installation, you’ll see the Copilot icon in the VS Code status bar (bottom right). A spinning icon means it’s initializing; a steady icon means it’s ready.

Tip
Installing GitHub.copilot automatically installs GitHub.copilot-chat. You don’t need to install the Chat extension separately.

Step 2: Sign In with GitHub

On first activation, Copilot prompts you to authenticate:

  1. Click the Copilot icon in the status bar, or open the Command Palette (Ctrl + Shift + P) and run GitHub Copilot: Sign In.
  2. VS Code opens your default browser to GitHub’s OAuth page.
  3. Authorize the “GitHub for VS Code” application.
  4. The browser redirects back to VS Code. The status bar icon updates to confirm authentication.

If you’re behind a corporate proxy or VPN, the browser redirect sometimes fails. In that case, use device code flow: the Command Palette command gives you a code to paste at github.com/login/device.

Warning
Organization-managed accounts may require admin approval before Copilot activates. Check with your GitHub org admin if sign-in succeeds but suggestions don’t appear.

Step 3: Verify Copilot Is Working

Open or create any code file — a simple Python file works well:

# function to calculate fibonacci sequence
def fibonacci(n):

Place your cursor at the end of the def line and wait 1–2 seconds. Copilot should display a ghost-text suggestion in gray. Press Tab to accept it.

If no suggestion appears:

  • Check the status bar icon. A slashed circle means Copilot is disabled for the current language.
  • Open the Output panel (Ctrl + Shift + U) and select GitHub Copilot from the dropdown to see logs.
  • Confirm your subscription is active at github.com/settings/copilot.

Step 4: Configure Settings

Open VS Code settings (Ctrl + ,) and search for copilot. Key settings to review:

{
  "github.copilot.enable": {
    "*": true,
    "markdown": false,
    "plaintext": false
  },
  "github.copilot.editor.enableAutoCompletions": true,
  "editor.inlineSuggest.enabled": true
}

The github.copilot.enable object controls which languages trigger suggestions. Set a language to false to disable Copilot for that file type. The wildcard * sets the default for all languages.

Disable for Specific File Types

If you don’t want completions in config files or documentation:

{
  "github.copilot.enable": {
    "*": true,
    "yaml": false,
    "markdown": false,
    "json": false
  }
}

Workspace-Level Settings

For project-specific configuration, create a .vscode/settings.json file in your repository root. This overrides user-level settings for that workspace only — useful for disabling Copilot in repositories with strict IP policies.

Step 5: Learn the Keyboard Shortcuts

These shortcuts work immediately after installation:

Action Windows / Linux macOS
Accept suggestion Tab Tab
Dismiss suggestion Esc Esc
Next suggestion Alt + ] + ]
Previous suggestion Alt + [ + [
Open inline chat Ctrl + I + I
Open chat panel Ctrl + Shift + I + Shift + I
Accept word-by-word Ctrl + +

Word-by-word acceptance is particularly useful when a suggestion is 80% correct — accept the good part, then type your own edit for the rest.

Takeaway

Master Tab, Esc, and Ctrl + I — those three shortcuts cover 90% of daily Copilot interaction.

Step 6: Use Copilot Chat

Copilot Chat provides a conversational interface for code explanation, generation, and debugging. Open it with Ctrl + Shift + I or click the chat icon in the sidebar.

Useful chat commands:

  • /explain — explain the selected code
  • /fix — suggest a fix for problems in the selection
  • /tests — generate unit tests for the selected code
  • @workspace — include your full workspace as context

Select a block of code before running a command to scope the response. Without a selection, Copilot uses the entire active file as context.

Inline chat (Ctrl + I) is faster for targeted edits. Type a natural-language instruction like “add error handling” or “convert to async” and Copilot generates a diff you can accept or discard.

Tips and Best Practices

  • Write descriptive comments before functions. Copilot uses comments as prompts. A comment like // Parse CSV, skip header, return list of dicts produces better suggestions than // parse file.
  • Keep related files open. Copilot reads your open tabs for context. If you’re implementing an interface, keep the interface definition open in another tab.
  • Use partial acceptance. When a suggestion is close but not exact, accept word-by-word with Ctrl + instead of retyping the whole thing.
  • Review every suggestion. Copilot generates plausible code, not verified code. Check edge cases, null handling, and security implications before accepting — especially for auth logic, SQL queries, and file operations.
  • Disable for sensitive repos. If you work on proprietary code with strict IP requirements, disable Copilot at the workspace level rather than relying on the organization-level content exclusion settings alone.
Note
Copilot suggestions are non-deterministic. The same prompt can produce different completions on different runs. If the first suggestion isn’t useful, cycle through alternatives with Alt + ].

Troubleshooting Common Issues

No suggestions appearing: Check the Copilot status bar icon. Hover over it to see the current state. Common causes: expired subscription, disabled language, network issues, or file exclusion patterns set by your organization.

Slow suggestions: Copilot requests go through GitHub’s servers. High latency usually means network issues or server load. Check the Output panel for timeout errors. If you’re behind a proxy, configure http.proxy in VS Code settings.

Authentication loop: If VS Code keeps asking you to sign in, clear the stored credentials: open the Command Palette, run GitHub Copilot: Sign Out, then sign in again. On Linux, check that your keyring service (gnome-keyring or kwallet) is running.

Danger
Never paste Copilot-generated code into production without review. AI-generated code can contain security vulnerabilities, incorrect logic, or license-incompatible patterns.

FAQ

Is GitHub Copilot free to use in VS Code?
GitHub Copilot has a Free tier with limited completions and chat interactions per month. For unlimited usage, the Individual plan costs $10/mo, Business is $19/mo per user, and Enterprise is $39/mo per user. Students and open-source maintainers may qualify for free Individual access.
Does Copilot work offline?
No. Copilot requires an internet connection to process suggestions. All inference happens on GitHub’s servers. If you lose connectivity, suggestions stop until the connection is restored.
How do I disable Copilot for a specific language or project?
In your VS Code settings, set "github.copilot.enable": {"yaml": false} to disable a specific language. For project-level control, add the same setting to .vscode/settings.json in your repository root.
What is the difference between Copilot completions and Copilot Chat?
Completions appear as inline ghost text while you type — accept with Tab. Chat is a conversational interface (panel or inline) where you ask questions, request explanations, or instruct Copilot to generate or modify code. Both are included in all paid tiers.
Can my organization control which repositories use Copilot?
Yes. Organization admins can manage Copilot access through GitHub organization settings. Business and Enterprise tiers support content exclusion policies, seat assignment, and audit logs for Copilot usage across repositories.
Does Copilot send my code to external servers?
Copilot sends code context (the current file and open tabs) to GitHub’s servers for inference. On Business and Enterprise plans, GitHub states that your code is not retained or used to train models. The Free and Individual plans have different data handling policies — check GitHub’s documentation for current terms.
Why does Copilot suggest incorrect or outdated code?
Copilot is trained on public code and generates statistically probable completions, not verified solutions. It may suggest deprecated APIs, incorrect logic, or code that doesn’t match your project’s conventions. Always review suggestions before accepting, and use Alt + ] to cycle through alternative suggestions.
Is GitHub Copilot free to use in VS Code?
GitHub Copilot has a Free tier with limited completions and chat interactions per month. For unlimited usage, the Individual plan costs $10/mo, Business is $19/mo per user, and Enterprise is $39/mo per user. Students and open-source maintainers may qualify for free Individual access.
Does Copilot work offline?
No. Copilot requires an internet connection to process suggestions. All inference happens on GitHub’s servers. If you lose connectivity, suggestions stop until the connection is restored.
How do I disable Copilot for a specific language or project?
In your VS Code settings, set “github.copilot.enable”: {“yaml”: false} to disable a specific language. For project-level control, add the same setting to .vscode/settings.json in your repository root.
What is the difference between Copilot completions and Copilot Chat?
Completions appear as inline ghost text while you type — accept with Tab. Chat is a conversational interface (panel or inline) where you ask questions, request explanations, or instruct Copilot to generate or modify code. Both are included in all paid tiers.
Can my organization control which repositories use Copilot?
Yes. Organization admins can manage Copilot access through GitHub organization settings. Business and Enterprise tiers support content exclusion policies, seat assignment, and audit logs for Copilot usage across repositories.
Does Copilot send my code to external servers?
Copilot sends code context (the current file and open tabs) to GitHub’s servers for inference. On Business and Enterprise plans, GitHub states that your code is not retained or used to train models. The Free and Individual plans have different data handling policies — check GitHub’s documentation for current terms.
Why does Copilot suggest incorrect or outdated code?
Copilot is trained on public code and generates statistically probable completions, not verified solutions. It may suggest deprecated APIs, incorrect logic, or code that doesn’t match your project’s conventions. Always review suggestions before accepting, and use Alt + ] to cycle through alternative suggestions.