I use BitBucket and had to change my password because it was compromised.
git pull
remote: Invalid username or password. If
Lately, BitBucket needs you to generate an App Password:
Settings/Access Management/App Passwords.
https://bitbucket.org/account/user/.../app-passwords
I know that this is an old question, but I thought I would provide the solution that worked for me. I signed up for bitbucket using my google account and did not have a password. Turns out the password is my Atlassian account password. If you have an Atlassian account then try this password to see if it works.
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.
In my case, my password was messed up. Just corrected my password and it worked.
You need to reset the password as shown below.
On macOS:
git config --global credential.helper osxkeychain
On Windows 10:
git config --global credential.helper store
After executing this, it prompts you for the user name and password for your repo.
If you've changed the password on Windows 10, go to credential manager and update the password:
I clicked on this button and it worked for me.
Here is the screenshot