I use BitBucket and had to change my password because it was compromised.
git pull
remote: Invalid username or password. If
Sometimes it happens when you change the remote bitbucket account password.
Solution
Go to Control panel => User Accounts => Credential Manager => Windows Credentials => move to Generic credentials and change the password of account