Git keeps mentioning my old username even if I can't find a trace of it

In addition to everything mentioned in the question and @gturri suggestions in the comments, the next step is to check whether git or the os are caching your credentials.

Check the keyring on your OSX / Linux / cygwin and also check if git config [--global] credential.helper has been set.


you should check your remote:

git remote --verbose

If it says

origin  [email protected]:OLD-USER-NAME/project.git (fetch)
origin  [email protected]:OLD-USER-NAME/project.git (push)

then your can fix it doing

git remote set-url origin [email protected]:MYUSERNAME/project.git

I was having the same issue as the OP, and I'm not sure if he reported back, but the OSX keychain entry was my problem. After removing it, git push would prompt me for my user name and password.

Tags:

Git

Github