Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,355
Community Members
 
Community Events
168
Community Groups

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
TAGS

Atlassian Community Events