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

GitHub with 2FA - OAuth no longer working

Andrew Whitegiver February 22, 2018

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

2 votes
Andrew Whitegiver February 23, 2018

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.

Keith Smith April 16, 2018

That failed for me.

Sven Thoennissen
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!
January 15, 2021

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

1 vote
James McParlane March 12, 2018

This does not work with the latest Sourcetree 2.4.8.0

1 vote
Sreeharikrishan Vaitla
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!
February 22, 2018

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:

https://githubengineering.com/crypto-removal-notice/

 

Anyone found solution for this?

gamegineer
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!
February 23, 2018

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
TAGS
AUG Leaders

Atlassian Community Events