Hey, @bwebchris , you say you figured it out by creating an App password in Bitbucket and using that. How do you do this? Do you have any instructions? Like you, I didn't see this mentioned anywhere: Atlassian told us that we need now to use an App password, but they didn't give us so much as a clue as to how to do it. Thanks!
And Atlassian, this is a MASSIVE fail. You made a change that broke _everything_, without giving us _any_ instructions as to how to unbreak it. This is essential infrastructure for most developers, and it's halted my development entirely. How can we ever trust your products again?
I've followed all the instructions, including uninstalling and reinstalling Sourcetree, and now I've lost access to all my repositories.
No matter whether I use OAuth or Basic authentication, whether I refresh the OAuth token or refresh the App password I created, it gives a green check mark and Authentication OK message, but all my repositories are gone.
What am I supposed to do? Please _help_, Atlassian!
I have tried following these steps alongside some of the suggestions in the comments and just not having any luck. A lot of comments say to delete the 'passwrd' file, however I don't have this file at all.
When I try to follow this path to find the so called 'passwrd' file (C:\Users\<computername>\AppData\Local\Atlassian\SourceTree), I only see these files... I have searched through all folders and cannot find this file.
I tried to uninstall and reinstall and for some reason, it remembered all my account info and repositories etc which I didn't expect, so it didn't work.
Can someone please help and it's really hindering my ability to work as it is for others.
Thank you @Lukas Wallner - once I deleted this file and entered the app password created, it started working again.
For those still struggling with this, in order to delete the 'passwd' file you need to first set hidden files as visible > Show hidden files (microsoft.com). Once you have deleted the file, Sourcetree will open a pop-up prompting you to enter a password for your account. This is where you need to enter the App password you created. Following that, try pulling/pushing, and hopefully with any luck it should be working for you.
I have uninstalled and re-installed SourceTree many times, deleted the 'passwrd' file, created an app password in BitBucket, and authorized the SourceTree app in BitBucket, but I am still getting the same error message. I have been working on this for hours! Help is appreciated. Thank you.
This is a bug with Sourcetree. It can be resolved by not using Sourcetree. GitKraken is a great git client, really easy to use and has an integration with Bitbucket that couldn't make the process easier. Unfortunately it costs money after the trial. There are lots of other git clients out there, VS Code works with git as well. Also the command line is an option.
I thought I was out of the woods with this. I was all working fine this morning, but I just went to another projects repo and my command like is broken. It gives me "the message" and then pops up a Atlassian password login box. I tried both my Atlassian app password and my Bitbucket app password but it always gives the same response.
λ git fetch fatal: ArgumentOutOfRangeException encountered. Specified argument was out of the range of valid values. Parameter name: resultType bash: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1)
Update: I went in to my windows credential manager and edited all the Atlassian credentials pasting my app password in each. Then tried the command line again, it failed and I pasted app password in Atlassian and git-for-windows pop ups. Then it proceeded to fetch!
FYI: My repos had different protocols on the remotes, one was git@bitbucket and the other https://user_name@bitbucket. So I must have cloned one from Source tree and the other from the command line..
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022 edited
@Vincent Miller just to be clarify before we try other things, when you re-authorized/connected your Bitbucket Cloud account did you use your Bitbucket Cloud username as the username (can't use email as username with app password) and used the new app password as the password (and ensured it was copied over correctly)? Also did you try any of the other 2 suggested authentication methods? OAuth is typically easier/quicker and does not require an app password.
I followed all the instructions above, right through to uninstalling, deleting all data and reinstalling Sourcetree, but it still didn't work!
It doesn't say anything about this above, but first, you need to create an app password in Bitbucket (why Atlassian didn't include a bullet-point how-to on this in the original emails, we'll never know):
When you launch Sourcetree, you'll be taken through linking it to your Bitbucket account.
When you first link it to your Bitbucket account, if you're not already signed in, you'll have to sign in with your Atlassian/Bitbucket password, or whatever authentication you usually use to sign into Bitbucket.
But from then on, whenever you're asked for a password, use the app password you created above.
Once you're into Sourcetree, you'll need to set authentication to use the app password:
Tools > Options > Authentication > [your Bitbucket account] > Edit Hosting Service Bitbucket Host URL https://bitbucket.org Preferred Protocol HTTPS Authentication Basic Username [your Bitbucket account username] click the Refresh Password button enter the app password you created above
I tried using OAuth rather than Basic authentication, but I couldn't get that to work.
There are so many bugs in Sourcetree that I had to run through the complete uninstall/reinstall cycle half a dozen times before it finally worked. And I had to set up all my repositories in Sourcetree from scratch, re-cloning the repositories from Bitbucket. So this was a huge drain on my time and it shut down my business for a day.
But it's worth persisting. Having to start from scratch in GitHub would have taken far longer.
Atlassian, this is a monumental fail. Never do this to us again. If you're going to force us to switch to a new authentication method, make sure it actually works first. And maybe give us step-by-step instructions next time, rather than leave us to figure it out for ourselves? Even better, don't do it in the first place. This has not improved security: I've had to downgrade from OAuth to Basic authentication, and give the app password full permissions, because you didn't bother telling us what permissions it needs. My confidence in trusting my code to Atlassian is thoroughly shaken.
The piece of the puzzle I was missing was when SourceTree requested a password to BitBucket use the app password and not my BitBucket account password.
Thank you David! I finally got SourceTree working!
I love Atlassian.... but seriously this is a cluster of biblical proportions.
I removed the passwd file... and used the app password and this kinda works. I say kinda because now each time to do a push or pull... I have to re-authenticate each time.
My crystal ball tells me that doing this over and over leads to early death.
Can the good people at Atlassian please find a solution ASAP before my crystal ball prophecy comes true.
Had issues with this today also - My list of how to rectify.
Log into Bitbucket, go to Personal settings, App Passwords, revoke any you have set.
Go into App Authorizations and revoke any you have granted permissions to.
Go back to App Passwords and create a new one, copy the password and save it local for later use.
Download the latest version of sourcetree.
Open sourcetree and go to Tools/Options/Authentication and delete any accounts, close sourcetree.
Navigate to folder c:\users\<username>\AppData\Local\Atlassian\SourceTree and delete file Passwd.
Install sourcetree which should just launch your current version, go to Tools/Options/Authentication and add a new account, Authentication will be OAuth, click Refresh OAuth Token, this will launch BitBucket and ask you to authorise and set permissions for your app settings, grant every tick box.
Back to sourcetree, go to Tools/Options/Authentication and add a new account, Host:bitbucket.org, your username (not email) Authentication: Basic, Protocol HTTPS and refresh, now enter your saved app password from earlier.
Except for the last ditch effort of backing up your directories and uninstalling nothing worked for me. Then they don't tell you what you're supposed to do to restore what you backed up so now I have to manually add back all my repos. Then of course they don't tell you after you've added your account in the auth section of options that when it prompts for your password when trying to pull/push to a repo it's asking for your app password NOT your account password. Yay, another hour of productivity wasted on this nonsense, god this sucks!
155 comments