[Solved] remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication

Starting from March 1, 2022, Bitbucket Cloud users will no longer be able to use their account passwords when using Basic authentication for Git over HTTPS and the Bitbucket Cloud REST API. If you try to use an account password for Git operations, you will get an error remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.

The Github also had moved away from Account password to Personal Access token last year and now it’s Bitbucket turn. This will ensure the security risk are mitigated as the new system can be configured at repository level and the access permissions can be set according to the needs.

In this tutorial, we will see what is remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication and how to resolve the error.

What is remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication error?

There are two reasons why you get this error.

Reason 1: If you are trying to use Cloud Account passwords are and perform Git operations, you will get an error since Cloud Account passwords are not accepted by BitBucket anymore from March 1, 2022.

Reason 2: The issue shows when users go into their connected Bitbucket Cloud account in Sourcetree for Windows and update their current password to their new app password.

Once the user updates the password to a new app password, Sourcetree verifies that it was able to successfully authenticate the connected Bitbucket Cloud account (as shown below):

However, suppose the users perform Git Operations Cloud Repository (pull, push, etc.) using tools like Sourcetree. In that case, they will get an error message indicating that they are still using the account password and need to be switched to the app password.

Error: 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/workspace/repository

How to fix remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication error?

The Solution is simple and straightforward where you need to move from Account Password to App Password and set the Git remote URL to use the App Password. The detailed instructions are listed below.

Step 1: Create an App Password in BitBucket

  1. Go to the bitbucket.org website and log in with your account credentials
  2. From your avatar in the bottom left, click Personal settings
  3. Click App passwords under Access management
  4. Click Create App password
  5. Give the app password sufficient rights and a label related to the application that will use the password
  6. Don’t forget to save that password

Step 2: Modify the BitBucket Repository Origin URL

After creating the App password, come to the terminal and update the BitBucket repository origin URL to use App passwords instead of the Account password, as shown below.

In the case of Existing Repo

git remote set-url origin https://<Bitbucket_Username>:<App_Password>@bitbucket.org/<Repo_Name>.git

In the case of New Repo

git clone https://<Bitbucket_Username>:<App_Password>@bitbucket.org/<Repo_Name>.git

Conclusion

BitBucket has moved from Account Password to App Password from March 1, 2022, So if you are still using the account password to perform Git Operations you will get an error remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication..

This can be resolved by switching to App Password from Account Password. First Login to BitBucket and follow the instructions specified to creating an App Password in BitBucket and once it’s done set the origin URL to use the App Password.

19 comments
  1. “BitBucket has moved from Account Password to App Password from March 1, 2002”

    You have an incorrect date specified in your article.

  2. Thank you. Simple and nicely explained

    I just had confusion on user and repo name. But I got that from the ‘Clone’ repo settings popup. Maybe you can add that in for noobs like me.

  3. Hi,

    i have done same thing but i am getting below error
    “remote: The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you’re authenticated.”

    can you help me please

  4. Hi ,

    I tried the same steps and I am getting an error like
    bash: (username): No such file or directory
    Could you please help resolve the same

  5. Thanks mate, I was getting crazy… I have tried many other solutions but this was the only one working for me

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Subscribe to get notified of the latest articles. We will never spam you. Be a part of our ever-growing community.

You May Also Like