It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sourcetree keeps asking for bitbucket password on windows

Viewing page 2 of 2

41 answers

Well here's what I did to fix the problem. Incidentally, I had first updated to the latest version of SourceTree ( and that didn't help.

  • Tools > Options
  • Select the Authentication tab
  • I only have one account there under the Accounts section (my bitbucket account). I clicked it. That expanded some content and Edit / Delete links. I clicked on the Edit link and a new dialog window titled "Edit Hosting Account" opened.
  • Under the Credentials section of this dialog I clicked the "Refresh OAuth Token" button which immediately opened a browser window to a local address like the following (edited for security): http://localhost:34106/?state=authenticated&code=kjDSFOEWIN4394kdfjaieo
  • At the bottom of the dialog window I could then see an "Authentication OK" label with a green checkbox to its left
  • Click OK on this dialog and then the Options dialog that spawned it
  • I retried my Git operations and everything seems to be working now. The login dialog didn't appear

OK, so here's a follow-up. The problem returned for me. I tried my original solution and the problem still persisted. I then noticed in the details view of the Pull window a message relating to use of two-factor authentication. Specifically, if you've got two-factor auth enabled then you need to use an app password. There was a confluence link in the details and I went to it. That led me through instructions on creating an app password. One thing that was not mentioned is the required permissions to grant the app password, so I just granted it all permissions. After I went through this whole process I still had problems. But, I was confident I was on the right track. I then completely uninstalled Sourcetree (along with all lingering related directories after the uninstall). I then installed the latest version of Sourcetree and specified the app password. So far, this approach seems to have fixed the issue. I hope this helps someone else.

None of the steps above worked for me. The underlying problem has to do with the store manager for Windows. Please follow this blog to update the credentials manager.

After following those steps make sure you set the latest version of the credentials manager.

git config --global credential.helper manager

For OAuth in Windows 10 fixed with these 4 steps:

1. Create an app password in bitbucket under Settings > App Passwords.
Note copy the password to notepad as it only shows once.

2. In File Explorer, delete the passwd file in the %AppData%\Local\Atlassian\SourceTree\passwd file.

3. Add account with OAuth again. Two different password prompts will show.

4. Use your user name and app password for both.

Came across this same issue and multiple posts too. So consolidated my research and fix at one place Summary is, problem solved when I used the same password for Atlassian's account address(which is the Gmail ID I used to OAuth to my bitbucket user), as that of my Gmail ID.

Just upgraded to 3.0.8 and my screen is quickly covered in login dialogs. Please fix this issue.

Hi Ryan,

Please see my above post about choosing to system git.

In this case, you need to upgrade your system git to latest and configure source tree to use system git instead of its embedded git.

I've briefed those how to steps in above post.




This did solve the multi-login problem, but introduced a number of others since Sourcetree apparently doesn't support 2.19.1. Downgrading to 2.19.0, hopefully I can get this back working soon.

Still happening somewhat randomly that I'll get a dozen or more windows asking for my password filling my screen.

This issue is a troll I guess... Almost ~5 years of using and this issue continue coming back from time to time... With no solid way to fix it... I am very disappointed by Atlassian team silence on this one. Please at least fake caring about...

Wow I've found a new solution for my case... Don't know what is involved under the hood but it seems to be linked to script execution policy...

More context:
When I was starting a git bash terminal in order to try manual `git fetch` on an ssh authenticated github repository, I was getting this error:

$ git fetch
CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error

(while all was working well in a PowerShell terminal)


What I've done to fix it:

  1. Start PowerShell with administration rights.
  2. Get your current script execution policy for later
    $currentExecutionPolicy = Get-ExecutionPolicy
  3. Set it to run local scripts not coming from internet
    Set-ExecutionPolicy RemoteSigned
  4. Start SourceTree
  5. Try to fetch a repository that bother you with credentials popup again and again => for me it works now without prompting! \o/
  6. (optional) Then you can restore your previous script execution policy, it will still work!
    Set-ExecutionPolicy $currentExecutionPolicy


SourceTree team please can you explain that?

The accepted answer here was what finally worked for me, after hours of trying to use lots of different solutions.

My fix ended up being to go into the Tools/Options/Authentication in sourcetree, and set my bitbucket account to be the default login details. No idea why that fixed it but now Im able to pull again and the login pop ups have gone away.

That's worked for me:

Go to Tools -> Authentication -> pick your account -> click Set as default

4 years old for what should be a priority bug fixed within days.  

None of the workarounds suggested work close to reliably (most of them don't work at all), neither should they be needed.  This is simple stuff, that every other git client got right from day 1.  

It'll be working fine for weeks then fail, and once it's failed it's dead.  Often nothing short of a complete uninstall and reinstall will work.

It always happens with me, whenever I open the source tree it asks for the password again and again.

I have 5 projects in my source tree from 2 different id's of bitbucket form company account of skydevelopers

whenever after the shutdown of the system I restart my system and open source tree during pushing the code it asks for the password again and again. but during commit of code, it doesn't ask for the password

Problem solved by "Update Embedded" for "Embedded" or default settings.


why sourcetree just do not do this by DEFAULT !!!!!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,135 views 0 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you