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

Can't add Github Account to Sourcetree

Gabriel Asman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2018

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

Hi,

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>@STAuth-github.com 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. 

 

Thanks!

Gabriel Asman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2018

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)

Cheers!

Ryan Sherman April 6, 2018

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.

Timothy Wyant
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 2, 2019

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>@STAuth-github.com 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
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2019

Can you try adding your Github account using ssh?

gpfister
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2019

Hi,

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

Atlassian Community Events