Beginner
How to sign in with GitHub account on GitHub Copilot
Quick Answer
Sign in to GitHub Copilot by installing the GitHub Copilot extension in your IDE, clicking the sign-in prompt, and authorizing through GitHub's authentication flow. Once authenticated, you'll have access to AI-powered code suggestions and completions.
Prerequisites
- A valid GitHub account
- GitHub Copilot subscription
- VS Code or compatible IDE installed
- Stable internet connection
1
Install GitHub Copilot Extension
Open VS Code and navigate to the Extensions tab by clicking the Extensions icon in the sidebar or pressing
Ctrl+Shift+X. Search for GitHub Copilot and click Install on the official GitHub Copilot extension.Tip
Make sure to install the official extension published by GitHub to avoid security issues.
2
Access Sign-In Prompt
After installation, VS Code will show a notification prompting you to sign in. Click Sign in to GitHub in the notification. Alternatively, open the Command Palette with
Ctrl+Shift+P and type GitHub Copilot: Sign In.Tip
If you miss the notification, you can always access sign-in through the Command Palette.
3
Authorize Device Code
VS Code will display a dialog with a device code and automatically open your web browser to GitHub's device activation page. If the browser doesn't open automatically, navigate to
https://github.com/login/device manually.Tip
Keep the VS Code dialog open while completing the browser authentication process.
4
Enter Device Code
In your web browser, paste or type the device code from VS Code into the input field on GitHub's device activation page. Click Continue to proceed with the authentication.
5
Grant Authorization
GitHub will prompt you to authorize GitHub Copilot to access your account. Review the permissions requested and click Authorize GitHub Copilot to grant access.
Tip
The permissions allow Copilot to access your code context and provide relevant suggestions.
6
Confirm Authentication
Return to VS Code where you should see a confirmation message that you've successfully signed in. The GitHub Copilot icon in the status bar should now show as active (typically with a checkmark or your GitHub avatar).
7
Test Copilot Functionality
Open a code file and start typing a function or comment. GitHub Copilot should begin providing suggestions in gray text. Press
Tab to accept suggestions or Escape to dismiss them.Tip
Try writing a comment describing what you want to code - Copilot often provides excellent suggestions based on comments.
Troubleshooting
Device code expired during authentication
Close the browser tab and VS Code dialog, then restart the sign-in process using
Ctrl+Shift+P and typing GitHub Copilot: Sign In. Complete the process more quickly this time.Copilot not providing suggestions after sign-in
Check that your GitHub Copilot subscription is active by visiting
github.com/settings/copilot. Also ensure the Copilot extension is enabled in VS Code's Extensions panel.Sign-in fails with network error
Check your internet connection and any corporate firewall settings. You may need to configure proxy settings in VS Code or ask your IT administrator to whitelist
*.github.com and *.githubusercontent.com.VS Code doesn't show sign-in notification
Manually trigger sign-in by opening Command Palette with
Ctrl+Shift+P, typing GitHub Copilot: Sign In, and selecting the command. Alternatively, click the Copilot icon in the status bar.Ready to get started with GitHub Copilot?
Put this tutorial into practice. Visit GitHub Copilot and follow the steps above.
Visit GitHub Copilot →