Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sourcetree 2 Factor Authentication

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?

 

2 answers

0 votes
Manju Atlassian Team Feb 16, 2018

Hey @Jan,

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.

 

Captura.PNG

 

When doind push:Captura2.PNG

 

Push fail:

Captura3.PNG

Mike Corsaro Atlassian Team Apr 12, 2018

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.

Mike Corsaro Atlassian Team Apr 12, 2018

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!

I would also like to chime in on this.

I have the latest GIT installed and SourceTree is using my system GIT. I've also deleted and re-authenticated myself with Github. I have the same issues at the OP.

I've attempted to use OAuth, which gives me the same problems as the OP. If I used the Basic Authentication, I get, "Authentication Failed. Failed to check login for user <user>. Must specify two-factor authentication OTP code."

 

Edit:

It seems as if my git version wasn't updated or placed where it was supposed to be. I apologize. I updated my GIT version from 2.14 to 2.16.2 (Windows) and it now asks for 2-step authentication and correctly works.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,290 views 4 5
Read article

Community Events

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

Events near you