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):
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 https://confluence.atlassian.com/sourcetreekb/two-factor-authentication-2fa-with-github-in-sourcetree-402033499.html
But, unfortunatively, SourceTree seems to be extremely buggy in its Tools > Options > Authentication window:
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events