Ok, so Here's the scenario,
I had user1 logged in to my terminal for bitbucket account.
I had logged in like
$ git config --global user.name "user1"
$ git config --global user.email "[email protected]"
I was able to do commit
and push
perfectly.
Now I had another account on bitbucket with another email id for user2.
So I logged in like:
$ git config --global user.name "user2"
$ git config --global user.email "[email protected]"
But now when I am doing git push origin master
I am getting the below error.
fatal: Authentication failed for 'https://[email protected]/user3/test.git/'
So I completely uninstalled git
from my Ubuntu 14.04 and installed it again and logged in again. But even then getting the same issue.
How to avoid that error message?