Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How can I connect my Sourcetree to Github after enabling MFA on Github

I'm having trouble pushing my branch to origin, Source tree is saying that my Github Credentials are incorrect.  I was able to Sign into Github using the same credentials.  I also was able to push changes via command line.

I'm setting the Authentication type to OAuth and connecting via HTTPS.  I keep getting incorrect credentials.

1 answer

0 votes
Mike Corsaro Atlassian Team May 09, 2019

Hello! Are you using Windows, or Mac?


If you're using Windows:

  • Try removing and re-adding the account + credentials
  • Make sure git is up-to-date, and that the git-credential-manager-for-windows is up-to-date
  • If none of those work, try re-adding the repository using SSH (add the SSH keys to github, and be sure to change the URL for the repository)

On a Mac.

Mac OS 10.14

Sourcetree 3.1.2


I got it to a state where the only way it can work is if I remove my github account, and then when I try to commit or push, it prompts me for a password to github, and I then enter my Personal Access Token from github.  It works in that manner, but will be annoying each time I try to push or pull something.  Any ideas?

@Mike Corsaro ,  I'm still having trouble with this, can you advise?

Mike Corsaro Atlassian Team May 21, 2019

I can only offer limited help on Mac issues, but could you try adding the account via "basic" authentication, and then use the Personal Access Token as your password rather than wait for the prompt?


If that doesn't work, I'd recommend that you switch your repository to use the SSH URL, and add a SSH key to your github account and to Sourcetree. If needed I can provide a short guide on how to do that.

sure would you mind providing me with a guide if this method doesnt work

Suggest an answer

Log in or Sign up to answer
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...

7,020 views 5 13
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