Bug Fix: Sourcetree for Windows authentication error when updating to app password (2024)

Hello Sourcetree users!!!

With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for security purposes, how to create and use app passwords, and an informative FAQ) a number of Sourcetree for Windows users have brought to our attention an issue they are experiencing. We want to take the time to discuss it and provide a workaround to resolve the issue.

Please note, this issue is specific for Sourcetree for Windows. We have not noticed any similar issues with Sourcetree for Mac.

What is the issue?

Currently, the issue shows when a user goes into their connected Bitbucket Cloud account in Sourcetree for Windows and updates their password to their new app password. After updating the used password to the user’s new app password, Sourcetree verifies that it was able to successfully authenticate the connected Bitbucket Cloud account (as shown below):

Bug Fix: Sourcetree for Windows authentication error when updating to app password (1)

However, when users then go to execute Git operations from Sourcetree (i.e. push/pull from their connected Bitbucket Cloud repository) they receive the following error message indicating that they are still using their account password and need to change to using an 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

Although this issue occurs when switching to an app password, we have determined this issue is not caused by the use of app passwords themselves. Instead, we strongly believe this issue is related to issues with how Windows Git Credential Manager is potentially caching and still using bad credentials (even after users have updated their Bitbucket account password to an app password in Sourcetree for Windows).

What is the fix (or workaround)?

Windows-specific resolution

So, if you are using Sourcetree for Windows and experiencing this issue please take the following steps for resolution.

***Please note, the following steps are for Sourcetree for Windows.***

  1. Authentication with app passwords do not support the use of a user’s email address as the username. Some Git remote URLs in Sourcetree may be using a user’s email address which could cause authentication errors. Please check your Git remote URL for this issue. In the case that the email address is used as the username in the URL, the URL will need to be adjusted like so:
    • From Git remote URL using email address:
      • https://[email@email_domain.com]@bitbucket.org/[workpace]/[repository].git
    • To Git remote URL using Bitbucket Cloud username:
      • https://[bitbucket_cloud_username]@bitbucket.org/[workpace]/[repository].git
    • Next, try and push/pull to the connected Bitbucket Cloud repository. If your issue is resolved, you can skip the following steps.

  2. Update to the latest version of Sourcetree for Windows.

  3. After updating (or confirming you are already on the most updated version of Sourcetree for Windows), on the toolbar, click Tools, then click Options.

  4. On the Options, window click the Authentication tab.

  5. Next, under Accounts remove your connected Bitbucket Cloud account credentials completely.
  6. Next, Add your Bitbucket Cloud account back to the connectedAccounts.
    • You can do one of the following three authentication methods to connect to your Bitbucket Cloud account.You can either utilize OAuth using HTTPS, Basic authentication using HTTPS, or Basic authentication using SSH. For the first two, you can still use the HTTPS protocol users experiencing this issue were most likely already using. In that case, you would use your app password instead of your account password
      1. OAuth
        • In the Edit Hosting Account window, select the drop-down for Authentication and select OAuth.

        • Then hit the Refresh Oauth Token button. This will open up a webpage automatically with your browser and ask for your Bitbucket Cloud login details

        • Enter your login details (you will use your account password for this login step). If you were already logged in to your Bitbucket Cloud account then you may not be required to log in again.

        • Finally, click on Authorize Atlassian to authorize Sourectree to access your Bitbucket Cloud account.

        • Make sure the page shows Authentication OK with the green checkmark, then hit OK.
      2. Basicauthentication with HTTPSprotocol
        • Walkthrough the steps again to add/connect your Bitbucket Cloud account.
          • In the Edit Hosting Account window, select the drop-down for Authentication and select Basic.

          • Ensure your username is correct.

          • Ensure you are using an app password and that it is also correct (ensure there is no copy and paste error when copying the app password over to Sourcetree for Windows).

          • Ensure Preferred Protocol is set to HTTPS.

          • Hit Refresh Password.

          • Make sure the page shows Authentication OK with the green checkmark, then hit OK.

      3. Basicauthentication withSSH protocol
        • Follow the steps under the Set up SSH with Sourcetree for Windows section within Sourcetree documentation
          • https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

  7. Now, try to push and/or pull some code to your Bitbucket Cloud repository from Sourcetree for Windows.
    • If this works, then rejoice in the glory of your skills to fix weird software bugs. You are a God among us.

    • If this does not work you can try one more thing before reinstalling Sourcetree for Windows.

      • Navigate to C:\Users\<UserName>\AppData\Local\Atlassian\Sourcetree and remove the passwd file.
        • Please be warned, that after removing this file, Sourcetree for Windows may eventually prompt you for your password(s) again.
      • Next, again try and push and/or pull some code to your Bitbucket Cloud repository. If it works then you can ignore the following steps.
    • However, if the steps above did not resolve the issue (which, unfortunately, is the case for many Sourcetree for Windows users with this issue), then please proceed below to follow the steps for doing a full reinstall of Sourcetree for Windows.

Sourcetree Reinstallation Instructions

Please, that the following reinstall instructions are for Sourcetree for Windows.

***IMPORTANT***:Please note that reinstalling Sourcetree will remove all preferences and settings you may have. So, pleaseensure you backup the referenced folders/files below before proceeding.

  • Backup ALLSourcetreefolders and files (if any) located inC:\Users\<UserName>\AppData\Local

  • Backup ALLSourcetreefolders and files (if any) located inC:\Users\<UserName>\AppData\Local\Atlassian

  • Backup ALLSourcetreefolders and files (if any) located inC:\Users\<UserName>\AppData\Roaming\Atlassian

After backing up those folders and files, you can then proceed to uninstall and then reinstall Sourectree.

  1. Uninstall Sourcetree using the Windows Uninstall program.

  2. Only delete the following folders/files after you have backed them up. Delete the folders/files below before proceeding to the next step:

    • Navigate toC:\Users\<UserName>\AppData\Localand delete allSourcetreefolders and files (if any)

    • Navigate toC:\Users\<UserName>\AppData\Local\Atlassianand delete allSourcetreefolders and files (if any)

    • Navigate toC:\Users\<UserName>\AppData\Roaming\Atlassianand deleteall Sourcetreefolders and files (if any)

  3. Download Sourcetree for Windowsand install it

If after following all of the recommended steps above and you still are experiencing this issue, please let us know in the comments.

Thank you for your continued support of Sourcetree (and Bitbucket Cloud).

Happy coding,

The Bitbucket Cloud team

Bug Fix: Sourcetree for Windows authentication error when updating to app password (2024)

References

Top Articles
UESP Forums • View topic
Koblenz (Germany) weather - Met Office
WALB Locker Room Report Week 5 2024
Western Union Mexico Rate
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
³µ¿Â«»ÍÀÇ Ã¢½ÃÀÚ À̸¸±¸ ¸íÀÎ, ¹Ì±¹ Ķ¸®Æ÷´Ï¾Æ ÁøÃâ - ¿ù°£ÆÄ¿öÄÚ¸®¾Æ
The Potter Enterprise from Coudersport, Pennsylvania
Toyota gebraucht kaufen in tacoma_ - AutoScout24
Alpha Kenny Buddy - Songs, Events and Music Stats | Viberate.com
Nation Hearing Near Me
Www Thechristhospital Billpay
Https Www E Access Att Com Myworklife
Minn Kota Paws
Lesson 2 Homework 4.1
Void Touched Curio
2024 U-Haul ® Truck Rental Review
Skyward Login Jennings County
Velocity. The Revolutionary Way to Measure in Scrum
Average Salary in Philippines in 2024 - Timeular
Craigslist In Visalia California
Promiseb Discontinued
How your diet could help combat climate change in 2019 | CNN
Joan M. Wallace - Baker Swan Funeral Home
Best Nail Salons Open Near Me
Air Quality Index Endicott Ny
Aol News Weather Entertainment Local Lifestyle
All Obituaries | Gateway-Forest Lawn Funeral Home | Lake City FL funeral home and cremation Lake City FL funeral home and cremation
Watch Your Lie in April English Sub/Dub online Free on HiAnime.to
Arrest Gif
Pain Out Maxx Kratom
Cable Cove Whale Watching
Ardie From Something Was Wrong Podcast
manhattan cars & trucks - by owner - craigslist
Rgb Bird Flop
Pokémon Unbound Starters
Kiddie Jungle Parma
Mg Char Grill
Where Can I Cash A Huntington National Bank Check
Vanessa West Tripod Jeffrey Dahmer
New Gold Lee
Hindilinks4U Bollywood Action Movies
Craigslist Free Manhattan
Gold Dipping Vat Terraria
Xxn Abbreviation List 2023
062203010
Achieving and Maintaining 10% Body Fat
Wilson Tire And Auto Service Gambrills Photos
Acuity Eye Group - La Quinta Photos
Nfsd Web Portal
Gameplay Clarkston
Ff14 Palebloom Kudzu Cloth
Varsity Competition Results 2022
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 6742

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.