I use BitBucket and had to change my password because it was compromised.
git pull
remote: Invalid username or password. If
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.