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!


Connect SourceTree to 2-factor enabled GitHub

Plase provide a detailed summary of how to connect SourceTree to 2-factor enabled GitHub.

2 answers

1 accepted

I finally made it work.  I will try to summarize as best I can for others needing SourceTree to connect to GIT using 2-factor authentication (2FA):

  1. SourceTree: Tools > Options > Authentication:  Delete as many password accounts as you are able to delete.  Try deleting at least twice for those accounts that are hard to delete.

  2. Close SourceTree.

  3. Windows: Enter Control Panel > User Accounts > Manage Windows Credentials.  Delete all "Git-look-alike" credentials, i.e. the credentials in SourceTree: Tools > Options > Authentication that you were not able to delete.

  4. GitHub:  Set up 2FA.  I used SMS-verification.  Google a bit and you will find a guide.  This step was quite straight-forward.

  5. GitHub:  Create a token: Log in to GitHub, press user drop down arrow at upper right corner, choose 'Settings', choose 'Developer settings', choose 'Personal access tokens', choose 'Generate new token'.  I gave the new token access rights to everything.  Save the token.  My token was a string consisting of 40 characters.

  6. SourceTree: Clear all saved password:  Windows: Go to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and remove the 'passwd' file.  The purpose of this step, is to force SourceTree to ask for password in next step.

  7. SourceTree: Open SourceTree and do a Pull Request. SourceTree will now ask for password.  Use the token from (5) as password.
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 09, 2021

I'm glad you sorted it out and thanks for documenting the steps for other community members!

You can mark your own answser as accepted if you want to.

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 08, 2021 • edited

Hi again,

I read your post while answering your other one.

I haven't used SourceTree myself since a while. But I found this article in the documentation: Two-Factor Authentication (2FA) with GitHub in SourceTree 

The article says: "For versions earlier than SourceTree 2.4 for Mac and SourceTree 1.10 for Windows." SO I'm not sure if it will be of any help.
But I hope it points you in the right direction.


I found the information for recent versions.

Apparenltly newer versions support the Windows Credential Manager which supports 2FA.
So you'll need to use that tool.
See more on SourceTree for Windows 1.10.0-* authentication and accounts updates 

Thanks for answering.  Before installing a new password manager, i tried

But, unfortunatively, SourceTree seems to be extremely buggy in its Tools > Options > Authentication window:

  • NOT WORKING: Deletion of any password account set as "default account".
  • NOT WORKING: Editing any password account set as "default account".  (If trying to edit, the current passord account is not changed, but a new password account is created).
  • UNSTABLE:  Deleting password account not set as default account.  (Seems to me as if the *second* attempt to delete account normally works).


  • If a new password account is created, I am not able to set it as default. 

As far as I can see, this effectively means that it is impossible to edit a default password account(!)


I am using latest SourceTree version 3.4.5.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events