SourceTree 2.4 fails to connect to GitHub with OAuth after upgrade from 2.3.2

ncr100 January 3, 2017

I upgraded from 2.3.2 and saw the following error upon Fetching my repo. 

I then configured my Github Account from Sourcetree Prefs, and completed the OAuth wizard in Sourcetree, inputting my 2FA number. The Sourcetree GUI had "HTTPS" as the method, and after the OAuth did not show "connected" anywhere. I assumed it was all good, retried my Fetch, and got the same error.

I then reconfigured multiple times using OAuth, saw no errors during that process, but only at the end I saw the following error.

I then switched to using SSH, generated a local SSH key (not modifying my current setup..?), published that key to GitHub, and still saw the following error.

I finally restored SourceTree 2.3.2 from the Trash Can and am able to work again.

 

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch --prune origin 
Permission denied (publickey).
fatal: Could not read from remote repository.
 
Please make sure you have the correct access rights
and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.
 
Please make sure you have the correct access rights
and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.
 
Please make sure you have the correct access rights
and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.
 
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above

12 answers

2 votes
DriftwoodStudio June 15, 2019

Sourcetree 3.2 (224) and the GitHub integration is still crap.

Add account -- "failed to add SSH key"

Manually copy SSH key and set in GitHub settings -- SourceTree errors about failed permissions trying to connect

Try basic authentication -- more, slightly different errors about permissions failure trying to clone.

Try deleting account, re-adding in various ways -- errors, not a valid url, etc etc etc...

Just garbage. I'm a 20-year software developer, I know what I'm doing. But SourceTree fails no matter what I try. 

Note that GitHub Desktop app works 100%, and using Xcode's built-in Version Control integration to talk directly to GitHub works 100%.  So this is a SOURCETREE PROBLEM not a problem with GitHub or with repos at the other end. 

There may be some magic thing to do in 3.2 to actually get integration with GitHub to work, but if so it's non-obvious enough that an experienced developer spending half an hour trying different things failed to discover the right magic. 

Please fix your client. GitHub is too big a player in this space for your integration to not be completely seamless. BitBucket is not what my clients use, and as a freelancer I have to have a client that works with major services.

0 votes
magork September 18, 2021

Exact same problem here. It seems they don't care. sourcetree version 3.4.6

magork September 18, 2021

I have switched to github desktop

0 votes
chemisax November 6, 2019

I ended up switching to Fork.

0 votes
alexpearce92dev November 6, 2019

This is one reason I switched to GitKraken. 

0 votes
chemisax June 12, 2019

I'm on Sourcetree 3.2 and the problem still exists.

Intermittent access to GitHub on 2 clean Macs. (Sourcetree is also fresh install)

0 votes
Hesham Pasha April 12, 2019

same problem and it is really affecting me :S

0 votes
Robert Gallup November 23, 2018

I've started getting this error on GitHub when I try to push:

remote: Permission to [repository name].git denied to robertgallup

I've deleted and re-added the account, etc. Any suggestions?

0 votes
Adam Rudd October 9, 2018

ah, still getting this issue in 2.7.6

0 votes
Deleted user February 5, 2017

where is v2.3.2 sourcetree ?....

0 votes
ncr100 January 26, 2017

Workaround here: https://jira.atlassian.com/browse/SRCTREE-4466

 

Will be fixed in upcoming SourceTree, according to Atlassian.

0 votes
Richard Forsythe January 24, 2017

Had this problem with 2.4 as well.

Can't get any reliable connection to Github. OAuth simply doesn't work, with or without 2FA (I turned it off). Basic mode works, but prompts for password all the time. Even SSH with key file.

Bitbucket works fine.

Downgraded to 2.3.2 and at least can work again.

0 votes
Tim Lark January 10, 2017

Exact same problem here.  Have not tried to downgrade yet.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events