I found this article:
https://confluence.atlassian.com/sourcetreekb/two-factor-authentication-2fa-with-github-in-sourcetree-402033499.html
I am searching for exactly the same, unfortunately this solution works only on source tree 2.4 and earlier. My version is the latest: 2.7.
Anyone an idea where to fill in the token so I can use 2FA for my remote server?
Hey @jacfab,
You can use OAuth to sign in while adding your Github account in Sourcetree. You can add the account in Preferences window - Accounts tab.
Hi @Manju, I've setup OAuth in Sourcetree v2.4.8.0 in Windows without issues, but when trying to push to any repo it open a login popup from github. After writing my credencials it fails the push.
When doind push:
Push fail:
Hello! When you get that login dialog, are you filling in your username and password? And does that dialog then prompt for a 2FA approval?
Hi @Mike Corsaro, I fill it with my username and password, tried with email too. No, it does not prompt for 2FA approval. It just try to push and fail.
Could you try going to "Tools > Options > Authentication", remove all of the accounts, and then try pushing again?
If that doesn't work, could you try installing the newest version of Git from https://git-scm.com/, restart Sourcetree, and then go to "Tools > Options > Git" and select "Use System Git", and then try again? Thanks!
Answer > https://stackoverflow.com/a/53624774/1023074
It looks like you're new here. Sign in or register to get started.