App passwords for git authentication(bitbucket and sourcetree)

Viewed 2893

When I tried to push,sourcetree shows below error.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags ruling master:master
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/xxxxxxx/ruling.git/'

So I went to https://bitbucket.org/account/settings/app-passwords/ Created app password, added Password Lable, and Select Permissions.

But still, push does not work and the same error message appears.

After that, I don't know what to do. Please advise me what should I do next.

2 Answers

In addition to the other answers here is a tip that worked for me:

I had the same issue in Sourcetree when I switched to bitbucket app password. I reinstalled the Sourcetree as well but had no luck.

I tried reinstalling again but this time I logged out of that browser window (which shows authentication successful) after completing the authentication process and installation. Then I tried using basic authentication in tools > options > authentication and it worked.

The difference I did notice was: Sourcetree promoted for the app password when I was logged out from the browser which it didn't when I was logged in.

Related