Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

peter May 8, 2019

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
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 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)
peter May 10, 2019

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?

peter May 21, 2019

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

Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
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.

peter May 21, 2019

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
AUG Leaders

Atlassian Community Events