Sign in to GitHub from Windows
When to use this: Git asks for a password and rejects it, or you need to push for the very first time.
Before you start
Steps
-
Easiest: let Git Credential Manager do it
terminalgit pushGit for Windows ships with Git Credential Manager. The first time you push to a GitHub HTTPS URL, a browser window opens, you sign in once, and Windows remembers the login.
If no window appears, use the GitHub CLI option in the next step.
-
Alternative: GitHub CLI
terminalgh auth loginChoose GitHub.com, HTTPS, then 'Login with a web browser'. Follow the one-time code. Install the CLI first from cli.github.com if the command is missing.
-
Check who you are signed in as
terminalgh auth statusShows the account and which protocol is used.
Expected output
github.com ✓ Logged in to github.com account yourname (keyring)
How to verify it worked
gh auth statusshows your account, andgit pushcompletes without asking for a password.
How to undo it
Sign out of the GitHub CLI:
gh auth logoutTo clear a wrong saved Git login, open Windows 'Credential Manager', then 'Windows Credentials', and remove the entry for git:https://github.com. Git will ask you again.
Common errors and fixes
remote: Support for password authentication was removed You typed an account password. Use the browser sign-in (Credential Manager or gh auth login) or a personal access token instead. Permission denied (publickey) Your remote uses an SSH URL but no key is registered. Either add an SSH key to GitHub, or switch the remote to HTTPS: git remote set-url origin https://github.com/USER/REPO.git. fatal: Authentication failed after changing GitHub password or token Remove the old saved credential in Windows Credential Manager (see Undo) and sign in again. Q&A
HTTPS or SSH, which should I use?
HTTPS with Git Credential Manager is the simplest on Windows. SSH is fine if you already use keys. Both work with Vercel because Vercel connects through the GitHub app, not your keys.
Does signing in on my PC give Vercel access to GitHub?
No. Vercel is authorised separately, from the Vercel dashboard, by installing its GitHub app on your account or repository.