After Googling for few days, I found this is the only question similar to my situation.
However, I just solved the problem! So I am putting my answer here to help anyone else searching for this issue.
Open "Keychain Access.app" (You can find it in Spotlight or LaunchPad)
Select "All items" in Category
Search "git"
Delete every old & strange item
Try to Push again and it just WORKED
If problem is coming on windows then remove the Credentials from the Windows history.
remove credentials from git
In step 18, I assume you mean ssh-add ~/.ssh/id_rsa
? If so, that explains this:
I also suspect some local ssh caching weirdness because if i mv ~/.ssh/id_rsa KAKA and mv ~/.ssh/id_rsa.pub POOPOO, and do ssh [email protected] -v, it still Authenticates me and says it serves my /home/meder/.ssh/id_rsa when I renamed it?! It has to be cached?!
... since the ssh-agent
is caching your key.
If you look on GitHub, there is a mederot account. Are you sure that this is nothing to do with you? GitHub shouldn't allow the same SSH public key to be added to two accounts, since when you are using the [email protected]:...
URLs it's identifying the user based on the SSH key. (That this shouldn't be allowed is confirmed here.)
So, I suspect (in decreasing order of likelihood) that one of the following is the case:
If 1 isn't the case then I would report this to GitHub, so they can check about 2 or 3.
More :
ssh-add -l check if there is more than one identify exists if yes, remove it by ssh-add -d "that key file"
On Mac, if you have multiple GitHub logins and are not using SSH, force the correct login by using:
git remote set-url origin https://[email protected]/username/repo-name.git
This also works if you're having issues pushing to a private repository.
Its due to a conflict.
Clear all keys from ssh-agent
ssh-add -d ~/.ssh/id_rsa
ssh-add -d ~/.ssh/github
Add the github ssh key
ssh-add ~/.ssh/github
It should work now.
I am using Mac and the issue is solved by deleting github record from keychain access app: Here is what i did:
Above steps are copied from @spyar for the ease.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With