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

Can't add Github Account to Sourcetree

I have a Github account (2FA enabled) that I would like to add to Sourcetree (on MacOs). I have tried every conceivable combination of OAuth/BasicAuth, SSH/HTTPs and Personal Access Token that I can think of - to no success.

(The particular way it fails is different for each configuration of the above - sometimes it continually ask for details when attempting fetch the list of repositories, other times it just gets stuck while loading the cloning of a project)

Noteworthy, this was working just fine until a few days ago, and based on other glitches I've been dealing with, I highly suspect the this was caused by a recent OS update (updated to High Sierra)

Has anyone encountered similar issues - and is anyone aware of a remedy? Or, am I overlooking something important?

1 answer

1 accepted

2 votes
Answer accepted
Manju Atlassian Team Feb 12, 2018


It would be helpful to diagnose this if you can provide specific error messages. 

However, I would recommend you to remove any old keychain items for GitHub and remove the account from Sourcetree too and add it again. 

This time, please use OAuth/https combination. Make sure to verify the new keychain items are written and also an encrypted file with the file name format <username> is written at location ~/Library/Application Support/SourceTree/

If something is missing, please try again after restarting the mac. This helps fixing permissions with keychain. 

Feel free to revert back with any error you encounter. 



Thank you very much - this worked for now, removing the account & the keychain items & restarting the Macbook. (Think I'd previously tried this without the restart)


I tried the same thing by removing the account and the keychain items and restarting the Macbook. I added the new account using OAuth/https and it created the keychain but I don't see any folder for SourceTree in the Application Support folder.

I have the same problem.  I have Sourcetree for years, with both local and remote repos.  I followed the instructions above (Mac OS Mojave 10.14.2, Sourcetree 3.1.1)


I deleted the file <username> is written at location ~/Library/Application Support/SourceTree/ before rebooting, but creating the new account in sourcetree did not create this file.  It did create new keychain entries.

Trying to create a remote repository failed because of an "owners failure", then put me in sourcetree window I could not get out of without a force quit.

Restarting source tree puts me back where I was -- when I try to push to an existing remote repository, I get a repository not found error message, with a repository path that I believe should work.

I have not problem signing in to github on the internet, then everything looks fine.  But I can't do any pushing or pulling from the corresponding local repos.

Manju Atlassian Team Mar 07, 2019

Can you try adding your Github account using ssh?


I have the same issue I think. I’m using SourceTree 3.2.1 on a Mac (latest version) and my github has 2FA. Each time I try to connect to my GitHub account, only a read-only access is proposed.

I have tried to remove GitHub with every tool, and also manually including preferences. I rebooted multiple times, cleaned the Keychain, but no matter what it only proposes read-only.

I have no such problem with other tools (Docker, GitKraken, ...).

Any idea ?

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,263 views 5 14
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