Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

155 comments

Lukas Wallner
Contributor
March 10, 2022

Just noticed you have a different Usr in your previous screen shot.
For me the authentication always worked after entering the App password, just an error occured when using git pull/push asking to use app passwords.
After deleting C:\Users\[Username]\AppData\Local\Atlassian\SourceTree\passwd I was asked to enter the App pasword again, which did the trick.
Sorry, can' help in your  case ... :-/

ivgenib
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

I found it useful to click on "Default account for bitbucket.org" after step 6.

Like Andrew Good likes this
Daniel Shalmiev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

Additionally to the above actions I also have deleted the "accounts.json" file from %APPDATA%\Atlassian\SourceTree and that solved the issue.

danillo100
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

Aqui resolveu eu excluir o bitbucket e td dos meus projetos e fui pro github, deu certo!

Ignacio Vidal Ballester
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

Only creating an app password it works for me.

Thanks to @bwebchris 

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

@fanmixco if you are receiving that error it is likely the app password you created does not have the create privilege scopes

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

@Boris Chigirintsev if you provide me more details I can try and help you get the issue resolved. Did you fully walk through options, up to and including completely reinstalling Sourcetree?

Laura Brown March 10, 2022

Write in plain english and less techy!!!

Prasad Karnik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

I had to delete the passwd file to make it work.

Like anurag dhepe likes this
gmenvielle
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

For those struggling today, here is what I had to do.  And it's a mix of everything...

  • Delete the password file.
  • Try the basic authentication --> Get a parsing error
  • Close BB
  • Reopen, now edit the profile but use oauth
  • at this time I am asked again the app password --> enter it
  • Get the clear
  • Finally able to push some work.

 

I dread at what is going to happen when I try the same on the mac...

George
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2022

@David DansbyMany thanks was having all sorts of problems and followed your advice in an earlier post

I would suggest trying to use the OAuth authentication method instead? It's typically much easier to use and it should authenticate you by walking you through the Bitbucket Cloud login screens with your account password (instead of an app password).

This sorted everything in about 2 minutes ...... thankyou!

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 10, 2022

@gmenvielle thanks for clarifying.

Please let us know if you have issues with Sourcetree for Mac. From our experience and other users' experience, this issue did not occur in the Sourcetree for Mac version; you will still need to update your account password to an app password if you are using Basic authentication with the HTTPS protocol to connect to your Bitbucket Cloud account. However, if you do experience any issues when updating to an app password in Sourcetree for Mac please let us know here.

thanks again!

Gracie S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

Bitbucket.png

After creating app password, follow bellow steps.

1. go to C:\Users\<computername>\AppData\Local\Atlassian\SourceTree
2. Find file "passwd", Delete/Rename this file.
3. Open the source tree and try to pull/clone repository. 
4. When you pull/clone repository, password will be asked. Enter "app password" you have just created.

bitbucket1.png

Like # people like this
Berlin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

@Gracie S  thanx it work

Like adkehn likes this
PicabookYY
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

I had this issue switching to app passwords only with one machine, and nothing helped but a full re-install.

Thanks

Like David Dansby likes this
Ketan Panchal March 11, 2022

Hi there, I have been having trouble pushing/pulling in Sourcetree. I have followed the steps in this post (as best I could) and I am still having issues. Can someone help me resolve?

Simone P
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

didn't solve anything.... you should try your best not to suggest workaround for us but fix your software... if i suggest any workaround to my customer for a software that i develop, they spit in my faces and never come back -.-"

Laura Brown March 11, 2022

I did create a app password.

I did update my Sourcetree to the latest.

Now what? I need to remove my Bitbucket Cloud account credentials completely?

When I follow the instructions to go to "Tools/Options/Authentication" and delete the account listed there, the response I get is "Are you sure you want to delete the selected hosting account?"

That didn't sound right to me...

And, if i am supposed to delete  the "selected hosting account"...

The next step I should do is... as @DanielShalmiev posted, "[delete] the "accounts.json" file from %APPDATA%\Atlassian\SourceTree and that solved the issue."

Is that right?

I appreciate the help!

Pawel Cioch
Contributor
March 11, 2022

Atlassian is claiming it's not a bug with ST but it feel like it is. They say git credential manager is a problem so I removed it, and guess what ST is asking for password now. I setup SSH based auth and I can get the token via SSH but ST can't talk to repos. Also I have no idea why I need SSH to pull the token if can be done via HTTPS. I though using SSH means auth mechanism is SSH like for linux login, and then I don't need auth tokens because SSH is my auth...

Anyhow it's a bug in SourceTree! I have no problem to auth via terminal but ST is a mess

Pawel Cioch
Contributor
March 11, 2022

Fresh install in win10 VM, I'm trying to avoid helper


1.png

 

SourceTree is asking for PWD? I tried main account PWD, Username (as seen) pwd, and API Token, all failed

 

 

2.png

Here is the result


3.png

Somebody noted to use AppPassword, so this is confusing because you say you disabled passwords hahaha, in GitHub they call them access tokens

app password permissions.PNG

So I tried with all permissions but ST now treat my git url to clone as invalid so I can't re-enter, and you say it's not a bug?

Another thing, I try to use ready list from fresh install, also doesn't work
4.png

 

5.png

Like LPetri likes this
Marco Cabrera
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

After a few hours of getting crazy I have found the solution.. 

"Backup the bookmarks.xml and opentabs.xml" those are where your  config  data is set

 

1) remove ST

2) remove the folders stores in "C:\Users\yourname\AppData\Local\SourceTree"

3) install ST without creating ssh option

4) close ST

5) open ST and create a SSH PUBLICK/PRIVATE..( esa cosa)  Key  using the putty and pageat and all that from the tutorial

6) reopen ST.  see if you have any repo connected ( that's a good signal)

7) click on Clone to any repo (it ask you for the passphrase from the ssh key)

8) you are all set...  now you can  go to sleep or... push  your changes

 

if you like the comments in Spanish I can reply too.

Pawel Cioch
Contributor
March 11, 2022

It all works actually, you just made it over complicated, one side you say "we don't use password based auth" form the other you still use passwords. Just need to generate them in "app passwords" with added permissions. 

You may need to do this. Remove credential helper globally

git config --system --unset credential.helper


hit pull, or anything to invoke git. Close ST

restore helper

git config --system credential.helper store

 

Start ST and use pwd from "app passwords"

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

@Laura Brown that is right. You want to remove the account. After you remove your account, proceed to Step 6 and choose one of the three mentioned authentication methods to connect to your Bitbucket Cloud account. After you authenticate and connect to your Bitbucket Cloud account again then you will need to proceed to Step 7.

After you complete Step 7, please let me know if you are still experiencing the issue and getting an error.

Like Marco Cabrera likes this
Laura Brown March 11, 2022

@David DansbyI did all that... and it didn't work. I am in the process of reinstalling sourcetree, and the installation instructions on Atlassian are out of date, of course. And ran into problems installing/extracting Git:  https://prnt.sc/ukKJ4gOfrBv9 and now i'm stuck

Like Marco Cabrera likes this
Marco Cabrera
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

@Laura Brown  read my post.  hopefully  it will help you

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events