Skip to main content

Set up GitHub Copilot

Follow these steps to install, configure, and verify GitHub Copilot. Commands are provided for you to run; this guide does not inspect or change your computer.

Choose your operating system

Detecting your operating system…

Your progress

0 of 6 steps complete

0%
  1. Step 1

    Check your readiness

    Confirm your account, access, and local tools before installing anything.

    Before you begin

    • A GitHub.com account that you can sign in to in a browser.
    • Access to GitHub Copilot through an individual plan or an organization that has assigned you a seat.
    • Git installed for the GitHub Copilot app to work with repositories.
    • Permission to install applications and command-line tools on this computer.
    • A working internet connection to GitHub.com and GitHub services.
    • Windows with PowerShell 6 or later for Copilot CLI.
    • WinGet for the recommended command-line installs.

    Actions

    Instructions

    1. Sign in to GitHub.com and confirm that you can access your account.
    2. If your organization manages Copilot, confirm that it has assigned access to your account before continuing.
    3. Open Windows Terminal and run commands in PowerShell or Command Prompt.

    Verify your setup

    You can sign in to GitHub.com, your Copilot access is active, and you can install software on this computer.

    Expected result: All readiness checks are confirmed.

    Troubleshooting
    • If Copilot is unavailable on GitHub.com, confirm that you are signed in to the account that received access.
    • If this is a managed device, ask your administrator which installation methods are allowed.
  2. Step 2

    Install GitHub CLI

    Install the official GitHub command-line client, then confirm that your terminal can find it.

    Actions

    Recommended: Install with WinGet
    winget install --id GitHub.cli --source winget

    Instructions

    1. Run the WinGet command in Windows Terminal.
    2. Close every open Terminal window after installation, then open a new one so the updated PATH is available.

    Verify your setup

    Run the command in a new terminal session.

    Verification command
    gh --version

    Expected result: The command prints the installed GitHub CLI version.

    Troubleshooting
    • If `gh` is not found, open a new terminal and run the verification again.
    • If a package manager is blocked, use only an installation method approved by your organization.
  3. Step 3

    Authenticate and configure GitHub CLI

    Connect GitHub CLI to GitHub.com and choose how it should work with Git on this computer.

    Before you begin

    • GitHub CLI is installed and `gh --version` succeeds.
    • You can complete authentication in a browser.

    Actions

    Recommended: Start GitHub CLI sign-in
    gh auth login

    Instructions

    1. Select GitHub.com when prompted.
    2. Choose HTTPS or SSH for Git operations based on your existing setup or organization guidance.
    3. Follow the browser authentication flow and return to the terminal when it completes.

    Verify your setup

    Check the active account and authentication state.

    Verification command
    gh auth status

    Expected result: GitHub CLI reports that you are logged in to GitHub.com.

    Troubleshooting
    • If the browser does not open, copy the one-time code and URL shown by GitHub CLI into your browser.
    • If the wrong account is active, use `gh auth logout` and then run `gh auth login` again.
    • If organization resources remain unavailable, complete any required single sign-on authorization or contact your administrator.
  4. Step 4

    Install and authenticate Copilot CLI

    Install Copilot CLI with the recommended method for your platform, sign in, and verify the active user.

    Before you begin

    • Active GitHub Copilot access for the GitHub.com account you intend to use.
    • GitHub CLI authentication is recommended so Copilot CLI can use it as an authentication fallback.
    • Node.js 22 or later is required only when using the npm alternative.

    Actions

    Install Copilot CLI with WinGet
    winget install GitHub.Copilot
    Install Copilot CLI with npm
    npm install -g @github/copilot

    Requires Node.js 22 or later.

    Sign in directly from Copilot CLI
    copilot login

    Use this if Copilot CLI cannot use your GitHub CLI authentication.

    Instructions

    1. Install Copilot CLI using one method for your operating system.
    2. Run `copilot` to start the interactive session.
    3. If you are not authenticated through GitHub CLI, exit and run `copilot login`, then complete the browser flow.
    4. In Copilot CLI, enter `/user` to confirm the active GitHub account.
    5. Use the Microsoft Store as the primary installation method, or choose one official alternative.
    6. After installation, close all Terminal windows and open a new one before verifying.

    Verify your setup

    Confirm the command prints a version, then start `copilot` and enter `/user`.

    Verification command
    copilot --version

    Expected result: Copilot CLI starts successfully and `/user` shows the intended GitHub.com account.

    Troubleshooting
    • If `copilot` is not found, open a new terminal and verify the installation again.
    • If npm reports an engine error, install Node.js 22 or later or use the primary platform installer.
    • If sign-in succeeds but Copilot remains unavailable, verify your seat and organization policy with an administrator.
  5. Step 5

    Install and sign in to the GitHub Copilot app

    Install the desktop app from an official source and connect it to the same GitHub.com account.

    Before you begin

    • Active GitHub Copilot access.
    • A browser session that can authenticate to GitHub.com.

    Actions

    Instructions

    1. Install and open the GitHub Copilot app.
    2. Choose the option to sign in with GitHub.
    3. Complete the GitHub.com authorization flow in your browser.
    4. Return to the app and confirm that it shows your signed-in account.

    Verify your setup

    Open the app and confirm that it is signed in with the intended GitHub.com account.

    Expected result: The app is ready and no sign-in prompt remains.

    Troubleshooting
    • If the browser authorizes a different account, sign out in the app and repeat the flow with the intended GitHub.com account.
    • If the app is blocked by device policy, use your organization software portal or contact your administrator.
    • If the app reports no Copilot access, confirm seat assignment and organization policy on GitHub.com.
  6. Step 6

    Finish your setup

    Review each verification and keep the official references nearby for your next session.

    Before you begin

    • `gh auth status` confirms the intended GitHub.com account.
    • `copilot --version` succeeds and `/user` confirms the intended account.
    • The GitHub Copilot app opens without a sign-in prompt.

    Actions

    Instructions

    1. Re-run any incomplete verification before marking setup complete.
    2. Keep your selected platform accurate if you revisit this guide on another computer.
    3. You can reset this browser-only progress without affecting GitHub, GitHub CLI, Copilot CLI, or the app.

    Verify your setup

    Confirm that every earlier step is complete and each tool uses the intended GitHub.com account.

    Expected result: GitHub CLI, Copilot CLI, and the GitHub Copilot app are ready to use.

    Troubleshooting
    • Return to the first incomplete step and repeat its verification.
    • Use the linked official documentation for current product guidance.
    • Contact your organization administrator for seat, policy, single sign-on, or managed-device issues.

Reset progress