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

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

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

11 answers

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.

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

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.

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

 

Will be fixed in upcoming SourceTree, according to Atlassian.

0 votes
Deleted user Feb 05, 2017

where is v2.3.2 sourcetree ?....

ah, still getting this issue in 2.7.6

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?

same problem and it is really affecting me :S

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

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

This is one reason I switched to GitKraken. 

I ended up switching to Fork.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,942 views 0 12
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