Skip to content
Discussion options

You must be logged in to vote

Alright, I finally cracked this one after digging way too deep 😤

Turns out it’s not Git’s fault — it’s VS Code (and Windows credential caching).
Here’s what fixed it for me step by step:

🧩 1. Clear VS Code’s stored GitHub credentials

On Windows, VS Code stores GitHub tokens in the Credential Manager.
To clear them:

  1. Open Control Panel → Credential Manager → Windows Credentials
  2. Remove anything related to “github.com” or “git:”

Then restart VS Code.

🔐 2. Re-authenticate the correct GitHub account

After restarting, VS Code will ask to sign in again when you push or pull.
👉 Make sure you choose the right GitHub account this time.

⚙️ 3. Verify SSH key and identity

Run this in your terminal:

s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@braynixsolutions
Comment options

@learnersandeep
Comment options

Answer selected by learnersandeep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
3 participants