I\'m working with several repositories, but lately I was just working in our internal one and all was great.
Today I had to commit and push code into other one, but
I found something that worked for me. When I wrote my comment to the OP I had failed to check the system config file:
git config --system -l
shows a
credential.helper=!github --credentials
line. I unset it with
git config --system --unset credential.helper
and now the credentials are forgotten.