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

146 comments

infrontsoftware March 11, 2022

How frustrating.

Has anyone gotten this to work with SourceTree for Mac OS?

I've upgraded SourceTree.  I've deleted all the passwords out of key chain.   I deleted the user out of SourceTree and re-added.   I tried recreating a new App Password.  I've sworn and cussed.  

Every time the super useless error:

We couldn't connect to Bitbucket with your (infrontsoftware) credentials. Check your username and try the password again.

Atlassian was once the gold standard.  Now a pita.

Like Sean Cull likes this
Kha March 11, 2022

For me, beside passwd I also delete the file of userhosts in c:\users\<your user ID>\AppData\Local\Atlassian\Sourcetree

Uzee March 12, 2022

Removing the passwd file worked for me. But when I click to check my repositories after starting SourceTree it only shows me third party repositories, while my own appear only after waiting 5 minutes every time. Push and pull works, I just don't see my personal repositories for cloning until some time passes

ilhamhe March 13, 2022

Guys, this might help. If you are still failing after making the app password, try to change the remote URL to this format.

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

It works for me.

Like # people like this
Ashraf Amin March 13, 2022

For a quick fix I checked & commit changes using Sourcetree then push using Android Studio. May working for other IDE too. Hopefully helpful

Push Git Using Android Studio.png

Micheal Chung March 13, 2022

I have also tried all of these on my laptop for drawing with stylus support. But it is not working. Please acknowledge us with the right solution to this problem.

skolplus March 14, 2022

I had to uninstall and clean reinstall everything, then it worked

Like David Dansby likes this
Kegan Huntley March 14, 2022

One of my users overseas is having this issue. Extremely annoying. Hopefully this can fix it.

Tony King March 14, 2022

"Authentication failed Unexpected character encountered while parsing value: B. Path ", line 0, position 0".  V. helpful error message.  After years of fighting the Atlassian product I've splashed out £50 on GitKraken - and suddenly everything just works.

twicecircled March 14, 2022

It is finally fixed for me! However, 1 or 2 steps were missing from the instructions:

1. Under Tools -> Options -> Authentication -> After setting up the Account, click Set as default and confirm the resulting popup.

Without this step, when I tried to push/pull from the remote there would be an additional stage of asking for password.

2. There is another file file that you may need to delete/rename: C:\Users\<username>\AppData\Local\Atlassian\SourceTree\userhosts

This file auto-populates the username/email box of the final authentication popup (after deleting passwd). If you used to log in with your email, it autofills with the email, but this will always fail. We must log in with our usernames now.

After deleting both passwd and userhosts, a dialog asking me for the username and password popped up (even though I've already added the account under Options). Here I entered my username (not email!) and the app password I generated via the Bitbucket website and finally everything worked!

I did not have to uninstall/reinstall Sourcetree thankfully!

Like # people like this
David Dansby
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

 

@infrontsoftware we haven't had any issues with Mac version of Sourcetree. That error message is indicative of bad creds. Are you using your Bitbucket Cloud username or email address as username in the credentials?

Ted Johnson March 14, 2022

Removing the passwd file fixed it for me!

Jeremy Marquis March 14, 2022

I have a developer using oauth that is still getting the "remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication." in Sourcetree.  Refresh oauth gets a green success checkmark. 

My understanding is that the app password is only needed for Basic auth, not oauth, is this correct?  He is dead in the water.  I can access/push/pull to the same repos, also using oauth.  Any suggestions?  

infrontsoftware March 14, 2022

@David Dansby   

I was using the APP password.

I was able to get it to work.   I am not sure which of these steps solved the problem, but here is what I did:

  • Deleted all my keychain entries for Sourcetree and Bitbucket
  • Installed the latest SourceTree
  • Rebooted
  • Deleted the account out of Sourcetree
  • Created a new APP password and granted that password access to all functions (probably not great, but needed to get back up and running)
  • Re-added a Sourcetree account with the new APP password

That got me in.   I suspect it was the permissions (??) I granted to the app password.

Like David Dansby likes this
David Dansby
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

@infrontsoftware thats good to know. I'm not entirely sure, but I'm guessing it could be either wrong perms or copy and paste error (if you copy/pasted the app password; I only mention that because I've personally had that hit me a handful of times :coneofshame: lol).

Thanks for your patience and I'm glad you got it fixed.

David Dansby
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

@Jeremy Marquis you are correct, OAuth shouldn't require app password. It should walk you through the 3LO OAuth login process. When they set up OAuth does sourcetree open an browser and have them walk through the OAuth login steps (similar to logging into their Bitbucket Cloud account)?

Also to clarify, you connected to OAuth yourself and had no issues?

Sean Cull March 14, 2022

I got it working once I realised that Atlassian app passwords are different from bit bucket app passwords

very very frustrating

Like # people like this
John Bates March 14, 2022

I have been using git with ssh from the command line, but  after creating app passwords, couldn't get sourcetree to work.

I uninstalled and deleted as mentioned in this post. I then reinstalled.

I tried ssh and then basic, but could only get source tree to work with oauth.

Command line still works as before.

 

WAIT @Sean Cull there are Atlassian and Bitbucket app passwords? 

Like David Dansby likes this
David Dansby
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

@John Bates when you reinstalled Sourcetree did you first remove the file/folders associated with the sourcetree that you were uninstalling? 

I believe @Sean Cull is referring to Atlassian account API tokens which are similar, but not the same thing as Bitbucket Cloud's app passwords ; although slightly confusing I will say :/

Sean Cull March 15, 2022

Ignore my fix above

this is soooooo frustrating

today when I edit the account and enter the app password i get the full list of repos but as soon as I add a filter or click refresh I only see my personal repos and not the work ones 

Moorgy March 15, 2022

Thank you, love you. Guess I'm one of the lucky ones who didn't have to reinstall, poggies. Deleting the passwd file worked for me

John Bates March 15, 2022

@David Dansby  Yes I renamed the file/folders associated with the sourcetree before uninstalling.

I had tried to delete the password file as someone suggested but that didn't change anything. I was worried about breaking the command line tools. I use git for windows and scoop installer where I have my ssh setup.  I'm happy that wasn't broken. We use ssh in our Yocto build scripts. But I like to see the history in Sourcetree. I was using git gui while source tree was broken.

SilhouetteBucket March 15, 2022

I changed this days ago, in response to your email, to using an app password and things were working. Now I got the same error as everyone here and am having to do a complete reinstall? I thought the whole point of changing before the deadline was to avoid losing time to this change.

I'm a bit confused as to how this wasn't caught in test since it's happening to so many users. Was there a massive imminent security risk that necessitated this to be rushed out? How did this issue get by a QA pass? I would think that triple checking that this change would work on Atlassian products would be the most basic check needed to pass this change on to the user base.

And once you've discovered this issue is so rampant, why would you not revert your decision first and sort out the possible solution instead of making all of these users go through a lengthy technical process to fix another process that wasn't ready for the public? Was it not possible to undo the mandatory app password and revert to the old process for a couple of weeks to fix this?

Like John Bates likes this
StevenScharf March 15, 2022

Deleting the passwd file is the real solution as everything else is just a waste of time.

Flaviu Paul March 15, 2022

Bye Bye !!! What can I say, don't you test your changes using different clients and try to estimate the impact ? I guess you don't, bye bye !!!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events