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.
19 comments
Thank you man I appreciate this info.
Thank you so much! Finally a place this is explained properly.
I am glad it helped
“BitBucket has moved from Account Password to App Password from March 1, 2002”
You have an incorrect date specified in your article.
Corrected. Thanks for the feedback.
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.
Glad that it helped. I will update the post shortly for the git clone scenarios too. Thanks
Thank you for your sharing, It’s very helpful.
Thank you for this 🙂
Thank you so much 🙂
Valeu cara! Deu certo aqui!
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
Is it an existing repo or you are trying to clone a new repo?
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
Thanks you were more helpful than the bitbucket forums.
In my case I had to put the username again before the repository name e.g. git remote set-url origin https://:@bitbucket.org//.git
Thanks Srinivas you save me !
Glad it helped
Thanks mate, I was getting crazy… I have tried many other solutions but this was the only one working for me