How can I solve “fatal: Invalid credentials” error when pushing to Bitbucket?

When prompted to log in, use your username, but instead of your usual account password, use the app password:

To get the app password

  1. Go to the bitbucket.org website and log in
  2. From your gear in the upper right, and click Personal Bitbucket settings
  3. Click App passwords under Access management
  4. Click Create app password
  5. Give the app password sufficient rights (probably write on the repo at a minimum), and a label related to the application that will use the password
  6. Don’t forget to save that password

Leave a Comment