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
- Go to the bitbucket.org website and log in with your account credentials
- From your avatar in the bottom left, click Personal settings
- Click App passwords under Access management
- Click Create App password
- Give the app password sufficient rights and a label related to the application that will use the password
- 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.