I am not able to push to origin anymore in Github. Yesterday I made a mistake when introducing my username and now every time I try git push -u origin master I immediately get the following message:
remote: Invalid username or password. fatal: Authentication failed for https://github.com/my_user_name/my_repo.git/
I do not even get the prompt for username or password anymore. I have tried creating a new OAuth token and also a new ssh key but nothing seems to be working.
Any help will be much appreciated.
Edits: The .git/config file for the repo to push says:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/eduardopoleo/tesing1.git
fetch = +refs/heads/*:refs/remotes/origin/*
[credential]
helper = cache [options]
I got in contact with the guys from Github and the were able to help me solve the issue. Here I paste their mail:
If you're using the SSH remote you shouldn't be asked for a username or password. You can ensure you're set up to use SSH in a local repository with a command like this:
git remote set-url origin [email protected]:eduardopoleo/test1.git
You could also try exiting the credential cache, which should cause it to forget your username:
git credential-cache exit
The first suggestion was the one that worked for me.
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