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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Error while adding SSH key with GitHub account it says Upload Failed

Hello everyone I'm new to using SourceTree and I need to use the stash functionality basically for my task at work ( I know it can be done with git terminal as well ) 

Whenever I set up my GitHub account and with SSH protocol and my SSH key it says 

```
Upload failed

 

There was a problem adding your new SSH key to your GitHub account. Please add this manually via their website.
```

Now I have also again configured my system's Macbook pro's SSH key to my GitHub account again but the same error appears. 

Any help/information/guidance is appreciated.

6 answers

The problem is that you have enabled your two factor authentication and Sourcetree is not able to connect. You must go to your GitHub account and create a Personal Access Token in Developer Settings, after that you go to you Sourcetree and edit the Auth Type of your GitHub account to Basic, fill your username and paste your newly created Access Token instead of your password, this will bypass the second factor of authentication.

This worked like a charm. Thank you!

Like # people like this

Thanks a lot. It worked now.

Can confirm this worked for me. New install using an old (sourcetree-generated) key.

Hello, I am having this exact error with source tree 4.07.

I have tried all the recommended fixes and I cannot use source tree to access github at all.  

I am running the latest install of Mac Catalina, and I have XCode setup to work with personal tokens from github, all access to github is managed through ssh keys per githubs recommendation as part of their security enhancements.

 

the only git client that doesn't work with github is now sourcetree.  

Again, I have tried all the recommended fixes and I am still stuck with this error

I am getting this error right now. I have source tree connected to a different GH account and everything works fine. I checked the .pub files are different and the config file is edited properly in my .ssh folder. not sure what else to do. 

any ideas @bgannin ? Even when i add the key manually it still wont load my remotes in from that GH project. Super odd

bgannin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 02, 2019

When you run the command "ssh-add -l" does it show all your key(s) loaded into the agent?

Hey @bgannin - thanks for replying. Yeah all my keys are there

I am also getting this error, but everything else related to Github integration seems to be working. Can't push or pull, basically can't do any work with Sourcetree and Github until this is fixed. Bummer!

It was working fine, all my keys are loaded and Sourctree with GitHub has stopped working, same error!

Same issue for me. 

1 vote
bgannin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 19, 2018

Hi Divyesh,

Our apologies for the hiccup. Can you check in Console for any logs from Sourcetree that are printed when this error occurs. Alternatively you can you follow the steps in this article to help debug a bit further hopefully. 

Brian Ganninger
Senior Mac Developer, Sourcetree

no there was no logs available in the console. And after few try and errors I was  finally able to set it up with HTTPS and the software itself needs to get restarted before any repos gets loaded so yeah that way now its all set up and working.

Thank you for the response. :)

I keep getting the same error, when I turned debugging on, this log keeps appearing:

2019-03-11 17:27:25 +0000 (e) Error uploading key. Server returned - {"message":"Not Found","documentation_url":"https://developer.github.com/v3/users/keys/#create-a-public-key"}

For me worked this:

  1. I removed all my added SSH keys on github.com/settings/keys
  2. Removed all credentials and access keys in Keychain Access on Mac OS
  3. Reauthorized GitHub account in Source Tree Settings -> Accounts

Yes, this is very brute force solution, but I was updated to a newly MacBook and didn't transfer data (including SSH keys) from old MacBook. So for me saving old SSH keys was optional.

N.B.! Do not use this solution if you are using your existing SSH keys on other machines.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events