So here is the script,
I had user user1 connected to my terminal for a bitbucket account.
I registered as
$ git config --global user.name "user1" $ git config --global user.email " user1@gmail.com "
I was able to do commit and push fine.
Now I had a different bitbucket account with a different email id for user2.
So, I logged in as:
$ git config --global user.name "user2" $ git config --global user.email " user2@gmail.com "
But now, when I do git push origin master , I get the following error.
fatal: Authentication failed for 'https:// user2@bitbucket.org /user3/test.git/'
So, I completely removed git from my Ubuntu 14.04 and installed it again and logged in again. But even then get the same problem.
How to avoid this error message?
source share