VS Code has built-in GitHub authentication that works through your browser. You do not need an extension to sign in, and you do not need to copy tokens manually.
Once authenticated, you can clone private repositories, push commits, and create pull requests without typing your password again. VS Code stores your credentials securely in your operating system's credential manager.
This is separate from configuring your Git name and email. If you have not done that yet, start with /vscode/how-to-set-up-git-in-vs-code-and-configure-your-name-and-email.
Sign in to GitHub
The sign-in flow opens your browser, asks you to authorize VS Code, and sends you back to the editor. You do not need to copy tokens manually.
Trigger authentication
Authentication is triggered automatically when you perform an action that needs GitHub access.
Common triggers include cloning a private repository, pushing commits, or selecting Clone from GitHub in the Source Control view.
You can also sign in proactively: open the Command Palette and run GitHub: Sign In.
Authorize in your browser
Your browser opens a GitHub authorization page. Review the permissions VS Code requests and click Authorize Visual Studio Code.
Return to VS Code
After authorizing, your browser redirects you back to VS Code. A notification confirms that you are signed in. The Status Bar may show your GitHub username briefly.
If the browser redirect does not work (some browsers or network setups block it), copy the authorization token shown in the browser. In VS Code, select Signing in to github.com... in the Status Bar, paste the token, and press Enter. This fallback works the same way.
Where to see your sign-in status
After signing in, you can confirm your status in two places:
- The Accounts menu in the Activity Bar (the person icon at the bottom left) lists your signed-in GitHub account. Select it to manage your account or sign out.
- The Source Control view shows your GitHub username when actions like Clone from GitHub list your repositories.
What built-in authentication unlocks
Once signed in, you can do these things without typing a password or token again:
| Action | What it enables |
|---|---|
| Clone private repositories | The Git: Clone command and Clone from GitHub show your private repos alongside public ones. |
| Push commits | Push to any GitHub repository you have write access to without re-entering credentials. |
| Pull from private repos | Pull changes from repositories you have access to. |
| Create and manage remotes | Add GitHub remotes without separate authentication steps. |
VS Code stores your credentials securely using your operating system's credential manager: Windows Credential Manager on Windows, Keychain on macOS, and libsecret (or git-credential-libsecret) on Linux.
Sign in with a personal access token (GitHub Enterprise Server)
Signing in with a personal access token (PAT) is supported only for GitHub Enterprise Server. When the browser authentication starts, select Cancel on the sign-in prompts until VS Code asks for a token. Paste your PAT and press Enter.
Personal access tokens must have the repo scope for private repository access and the read:user scope for user information. Create tokens at github.com/settings/tokens or your Enterprise Server instance.
GitHub Pull Requests extension
Built-in authentication handles the basics. For pull request and issue management inside VS Code, install the GitHub Pull Requests extension (publisher: GitHub). It handles both pull requests and GitHub issues in the same view. This extension adds:
- A dedicated GitHub view in the Activity Bar (hover icon)
- Pull request creation, review, and merge
- Issue browsing and management
- @-mention and #-issue suggestions in comments and commit messages
The extension uses the same authentication session you already set up. You do not need to sign in again.
After authenticating, you are ready to /vscode/how-to-clone-a-github-repository-in-vs-code or /vscode/how-to-initialize-a-git-repository-and-publish-it-to-github-from-vs-code.
Rune AI
Key Insights
- VS Code prompts you to sign in to GitHub the first time you perform an action that needs authentication.
- Sign-in happens through your browser; you are redirected back to VS Code automatically.
- Built-in authentication works without any extension. The GitHub Pull Requests extension adds extra features.
- VS Code stores your credentials in your operating system's secure credential manager.
- You can sign out anytime with the GitHub: Sign Out command.
Frequently Asked Questions
Do I need a GitHub account to use Git in VS Code?
How do I sign out of GitHub in VS Code?
Can I sign in to multiple GitHub accounts at once?
Is my GitHub token stored securely?
Conclusion
Signing in to GitHub from VS Code gives you access to private repositories, lets you push commits without typing credentials repeatedly, and unlocks pull request and issue management directly in the editor.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.