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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

GitHub with 2FA - OAuth no longer working

Starting today, I cannot connect to GitHub with my configured OAuth connection.  Every time I try to pull or push it endlessly prompts me for my GitHub credentials, which I supply, but it rejects.  My GitHub account is configured for 2 Factor Authentication (2FA) and it never prompts me for the 2nd code send to my phone, and no code is actually sent to my phone anyway.

All of this should be moot, however, because I am using OAuth and 'SourceTreeForWindows' is set up as an 'Authorized OAuth App' in GitHub.

Things I've Tried:

  • Refresh OAuth Token. Result: seems to be successful but the endless pop-ups prompting me for credentials continues
  • Revoke access for 'SourceTreeForWindows' in GitHub and then Refresh OAuth Token. Result: re-adds 'SourceTreeForWindows' as an authorized OAuth App in GitHub, but the endless pop-ups prompting me for credentials continues
  • 1) Remove all entries for sourcetree and git in 'Manage Windows Credentials', 2) delete all accounts under Options -> Authentication in SourceTree, 3) Uninstall SourceTree from the Control Panel, 4) Completely delete %AppData%/Local/SourceTree and %AppData%/Local/Atlassian folders, 5) revoke 'SourceTreeForWindows' access in GitHub, 6) reinstall SourceTree 2.4.8 from scratch and re-add the OAuth connection to GitHub.  Resultthe endless pop-ups prompting me for credentials continues.  I still cannot pull or push.

What gives? How did it just stop working all of the sudden?

3 answers

I was able to fix it by ditching OAuth.

I removed the OAuth account under Options -> Authentication in SourceTree, then I generated a Personal Access Token in GitHub (under Developer Settings).  Then I added a new GitHub account in SourceTree and selected "Basic" authentication instead of "OAuth" and used the Personal Access Token I previously generated as my password.

That got me all up and running again.

That failed for me.

Worked great for me, thanks! I enabled 2FA in Github, and somehow I messed things up, this post resolved it.

This does not work with the latest Sourcetree

Git just recently deployed a change that disables support for deprecated legacy TLS and SSH algorithms, including those that were used in older versions of some Git clients:


Anyone found solution for this?

I was able to get the SourceTree 2FA dialog to pop up after uninstalling and reinstalling SourceTree a few times, upgrading system Git and rebooting a few times.  Not sure which action fixed the problem of 2FA not displaying but there's a fix in that combination somewhere.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events