gitbitbucket

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


My Bitbucket password is correct because I can easily log in with this password. When I try to push a project or file to Bitbucket it shows "Invalid credentials error".

git push -u origin master

fatal: Invalid credentials
Password for 'https://username@bitbucket.org':
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/username/demo.git/'

How can I solve this issue?


Solution

  • I had the same problem with my JetBrains IDE. It was showing a password dialog when I tried to update project sources or push my commits.

    enter image description here

    I solved the problem by following the below steps