Welcome to the GitHub Copilot Workshop! This guide will help you set up the necessary tools and authentication to get started with GitHub Copilot.
- Install Node.js and npm
- Install GitHub Copilot CLI
- Authenticate with GitHub
- Install GitHub Copilot in VS Code
- Verify your setup
Before installing the GitHub Copilot CLI, you need to have Node.js and npm installed on your system.
Option 1: Using the Installer
- Visit nodejs.org
- Download the LTS (Long Term Support) version
- Run the installer and follow the installation wizard
- Verify installation by opening PowerShell and running:
node --version npm --version
Option 2: Using Winget
winget install OpenJS.NodeJS.LTSOption 1: Using Homebrew
brew install nodeOption 2: Using the Installer
- Visit nodejs.org
- Download the LTS version for macOS
- Run the installer
Verify installation:
node --version
npm --versionUbuntu/Debian:
sudo apt update
sudo apt install nodejs npmFedora:
sudo dnf install nodejs npmUsing Node Version Manager (nvm) - Recommended for all Linux distributions:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install --ltsVerify installation:
node --version
npm --versionInstall the Copilot CLI globally using npm:
npm install -g @github/copilotOnce installed, launch the CLI with:
copilot💡 Tip: Launch
copilotin a folder that contains code you want to work with for the best experience.
If you're not currently logged in to GitHub, you'll be prompted to use the /login slash command. Enter this command and follow the on-screen instructions to authenticate.
For automated workflows or when interactive login isn't suitable, you can authenticate using a fine-grained PAT:
- Create a new token: Visit GitHub Personal Access Tokens
- Set permissions: Under "Permissions," click "add permissions" and select "Copilot Requests"
- Generate your token: Complete the token creation process
- Set environment variable: Add the token to your environment using either:
GH_TOKEN(higher precedence)GITHUB_TOKEN
💡 Cheking connection: Run copilot --banner in the terminal you should see you are authenticated with your user.
🎯 Model Selection: By default, copilot utilizes Claude Sonnet 4.5. Use the /model slash command to choose from other available models, including:
- Claude Sonnet 4
- GPT-5
-
Open VS Code
-
Access Extensions: Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+Xon Mac) -
Install Copilot: Search for "GitHub Copilot" and click "Install"
-
Authenticate: Sign in to your GitHub account when prompted and authorize the extension
-
Activate: After installation, reload VS Code to enable Copilot
ℹ️ Note: You need access to a GitHub Copilot subscription to use the service.
Quick Setup from VS Code:
- Hover over the Copilot icon in the Status Bar
- Select "Set up Copilot"
- Choose a sign-in method and follow the prompts
- If you don't have a subscription, you'll be signed up for the Copilot Free plan
Once everything is installed, verify your setup:
- ✨ VS Code shows the Copilot icon in the status bar
- 🔄 CLI responds to
copilotcommand - 🔑 Authentication is successful
- 💬 You can interact with Copilot in both environments
If you encounter any issues during setup:
- Check the GitHub Copilot documentation
- Verify your internet connection
- Ensure you have the latest versions installed
- Contact your workshop instructor for assistance