Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sourcetree no longer connects to Bitbucket with OAuth

danielklein_hmrreferrals
September 13, 2023

My Bitbucket account uses OAuth (since there's now no other option). Sourcetree has taken to asking me for my password, the credential helper store, etc. when I no longer use any of them. I've already followed all the steps from the "So you're using Windows and Sourcetree sucks" page. All except for wiping all of my details off the hard drive and reinstalling since I have a lot of connected accounts that I don't want to have to recreate.

Yesterday I was able to get connected by trying each of the options below in turn until one worked, but today none of them work. When I deleted the password file, Sourcetree immediately (not "eventually") asked me for the password, which I no longer use since it's OAuth, not username and password now. I was already using my Bitbucket username in the host address, not my email address.

Additionally, running

git fetch origin master

(what I was trying to do in Sourcetree) from the command line simply works.

I also can't use my computer while Sourcetree is running because it pops up the following prompt every three seconds.

image.png

image.png

1 answer

0 votes
Martin Runge
Community Champion
July 16, 2026

Hi @danielklein_hmrreferrals

The prompt loop usually means the repository remote is not actually bound to your OAuth account entry. Sourcetree stores the token per account, and if the remote URL does not match that account, it keeps asking for a password indefinitely. That also explains why plain git on the command line works fine.

What I would do:

  • Open Repository settings > Remotes, edit origin, and pick your Bitbucket account from the Host account dropdown instead of leaving a plain typed URL.
  • Check Tools > Options > Authentication, remove any duplicate or leftover Bitbucket accounts, and then add one fresh.
  • In Tools > Options > Git, switch to System Git and let the Windows Credential Manager handle it.

If the loop persists, I would create an app password in Bitbucket and add the account with that instead of OAuth. Less elegant, but it survives token refresh problems.

Is this still an issue for you, or has a later version of SourceTree sorted it out?

Cheers, Martin

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events