I use BitBucket and had to change my password because it was compromised.
git pull
remote: Invalid username or password. If
For me the issue was I changed my username so the git url also got changed. So I had to set the new git url using
git remote set-url origin <URL>
If you are a mac user this worked for me:
Then it will ask you for the password again.
I think is only an authentication problem...
That's all :)
First, edit your .git/config and remove your username from 'url'.
I had this:
url = https://username@bitbucket.org/pathto/myrepo.git
And after modification:
url = https://bitbucket.org/pathto/myrepo.git
Then try to pull (or push) and use your email and password credentials to login.