I use BitBucket and had to change my password because it was compromised.
git pull
remote: Invalid username or password. If
I was facing same error, But I didn't need to change my password.
Just go to bitbucket->preferences->accounts select your account and check if your password is correct.
bitbucket->preferences->accounts
In my case, my password was messed up. Just corrected my password and it worked.