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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How do I solve authentication issues with SourceTree 2.6.3?

I'm trying SourceTree for the first time, with version 2.6.3 (134). Not a big Terminal expert, so hoping this GUI would help my workflow. I've searched the community postings on authentication issues, but all are either older posts (from previous software versions), or don't fully relate to my situation somehow.

I'm not able to get it to authenticate properly. I know my login (email address) and password work on, and the first time that SourceTree prompts me with a login during the wizard setup, it also authenticates properly.

The problem begins when I'm viewing my remote repository list and click on "clone" for one of them. It brings up a login screen, and no matter how many times I try to login, it keeps giving me either an error message, or bringing up the login page again. 

In this scenario, my login is grayed out (pre-filled) with my username, which is different than my email address.

Can anybody please help me? I'm getting close to giving up and either trying another GUI choice out there, or struggling through Terminal.


Any help would be greatly appreciated!



10 answers

1 accepted

2 votes
Answer accepted

SOLVED: I used basic https authentication instead of OAuth, and it gave me full access to username and password, and it was able to connect successfully this time.

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 13, 2017

Glad you could figure this out, Robert! And thanks for sharing your solution!

Have a good day :)


Like Qasim Ali Cheema likes this

If you can't log in via basic https (only have google authentication) then the issue still exists.

Like # people like this

Hi Chris, my original problem stemmed from using the default OAuth, I believe... when I deleted my BitBucket account and re-created it, this time choosing the basic https authentication, it worked fine. 

So all is good now - thanks.

Yep basic https resolved the issue for me at my last company as well. The issue still exists if OAuth is your only way to log in though (which it is for me now). Just noting that it isn't 100% resolved.

Like # people like this

I experience same problem when using a Google account to login to bitbucket. when using suggested https method , source tree keep asking password and I have to save the generated app password and keep login again and again which is not good. I prefer using Oauth with SSH so all the keys are saved. the problem is when I login with my google account it redirect to repository view and not close after successful login , and only option is to click cancel.

The work around I found that works is , remove the account from source tree , then close source tree. go to your account on bitbucket settings -> oauth under access management , and choose revoke access to source tree. After that open source tree and add account , log in with your email and google authentication , you should see the screen of asking you to grant access for source tree to bitbucket account. if you see that screen, after you grant the login popup should close and you get access. 

The bug I think is if at this stage it does not show the grant access screen (since you already granted) it will go to the repository list view and source tree does not see this authentication as complete. 

hope source tree will fix this integration bug.

thank you a lot. This perfectly solved my issue !

Thanks a lot! This really saved my time.

this seems to reoccur on a regular basis still.  Glad to have a process to follow to fix it when it breaks.  

Like Deleted user likes this

One of my users is experiencing this similar issue after I turned on SSO for my org. Anytime he tries to push, SourceTree is asking him to authenticate. When he enters his domain creds (Azure AD) it tells him that it's incorrect. But he can log into BB just fine. I did a fresh install of SourceTree and was able to authenticate just fine during the setup process. I updated him to the latest version of SourceTree and that didn't help. Any suggestions?

See the link to my blog post above.  Let me know if that helps.  

I'm the user he's talking about.  I tried the token refresh but it gave me a Page Not Found error on localhost.

I have too have had trouble with source tree not retaining OAuth credentials and needing to refresh them.  I would not happen often, but every time  would spend hours trying to find where the setting was to fix it.  

I finally wrote it down so I could find it quickly.  Feel free to share.

Still Broken, 2+ years later.

I have a fix which worked for me on windows 10

Close the SourceTree if already running.

Clear the directory C:\Users\{UserName}\AppData\Local\Atlassian\

Now open again. I will start like new asking for the authentication.

Like # people like this

Thanks, @nilesh_vidyarthi ! Recently I was having issues with logging to Bitbucket account from Source Tree and your solution with deleting the Atlassian cache directory solved the issues on my side.

@nilesh_vidyarthi Thank you! This solved it for me.

Just wanted to update everyone on this. I was struggling with this issue too for hours and was unable to login to the Atlassian login prompt that reappeared constantly when trying to clone one of my remote repositories from BitBucket using Sourcetree.

A new version of Sourcetree (3.1.2) was just released as of today 3/19/2019. After updating it, I tried the same exact process again, and the Atlassian login finally took my credentials and seems to be working fine now.

Hi everyone, I've attempted @Yosi Oren's fix, however I seem to be stuck after the log-in page. There must be some sort of confirmation button that's missing here, as I can only press cancel. Any thoughts?

Screen Shot 2018-12-20 at 18.26.09.png

Check out last paragraph of my answer. If you list of repositories then you have experienced what I think is a bug. You have to restart the process from the top. Make sure to remove access already granted so the grant permission screen will appear next time you login. 

Thanks for getting back to me @yosi oren!

Unfortunately there was a bug with my version of Sourcetree which despite attempting your process multiple times, the grant permission screen wasn't appearing. On Sourcetree's suggestion, I updated my operating system to enable me to update to the most recent version of Sourcetree and the grant permission screen has appeared!

Thanks for your help!

Like Ana Retamal likes this

Update: I coincidentally tried this at the same time as the Atlassian twitter recommended it to me, but I got it working by trying basic HTTPS authentication instead of OAuth! It seems to be all working fine now! Phew!

hi guys. I've get exactly the same problem today and have not resolved it yet. You've broken my day.

Hi all,

I had the same problem : suddenly, my sourcetree connection to bitbucket (using OAuth) didn't work any more. Therefore I could't push my commits any more, which is critical.

I had to update sourcetree to the latest version (3.0.9 right now) and use @Yosi Oren workaround (thanks!) to make it work.

To me, this issue shouldn't be considered as resolved at all, because it is blocking when your only connection method to bitbucket is Google SSO and you don't know the workaround. A lot of people must be affected.

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 01, 2017

Hi Rob! Can you send us a screenshot of what's happening?

Also, when you get the prompt with the username field greyed out, have you tried entering your password? Do you get an error?

For troubleshooting purposes, could you try cloning that repo in the terminal and see what happens? (To identify if this could be an issue with Sourcetree or with the authentication itself).



Hi Ana,

Thank you for your reply, and sorry for submitting my support question right before going on a week-long vacation. :(


Ok, so I tried the sequence again, this time capturing screenshots as requested.


1. I open up SourceTree, and I'm taken to the "Local" repository tab, which is empty at this point. When I click on the "Remote" tab next to it, I see this login screen. You'll notice the grayed-out username of "robertfuste", even though I always sign in to with my email address instead.

Nonetheless, I enter my password, which I confirmed before works on

Screen Shot 2017-12-12 at 11.06.08.png


2. After attempting the first sign-in, I get the following error:

Screen Shot 2017-12-12 at 11.07.58.png


3. After I click on the "Ok" button, I get an empty "Remote" screen. So when I switch to the "Local" tab and back to the "Remote" tab again, I'm greeted this time with a different sign-in screen:

Screen Shot 2017-12-12 at 11.08.47.pngScreen Shot 2017-12-12 at 11.09.13.png4. I enter my credentials (this time using my email address), and this is the error message I get:

Screen Shot 2017-12-12 at 11.09.27.png

5. When I click on the "Sign In" button, I get the login screen again, and now I'm stuck in a loop:

Screen Shot 2017-12-12 at 11.09.39.png


I have uninstalled BitBucket, and re-installed it, to see if that would help, but the same steps get repeated.

So if you're able to step me through what I might be doing wrong, I'd be much appreciative.


I'm having this exact issue, too.

Edit: I solved the issue by removing and reading my account in preferences, using Basic authentication, and HTTPS instead of SSH.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events