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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. It worked now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks. works for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this solution worked for me:
ssh-add -K ~/.ssh/<git_key_name>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can confirm this worked for me. New install using an old (sourcetree-generated) key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any ideas @bgannin ? Even when i add the key manually it still wont load my remotes in from that GH project. Super odd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you run the command "ssh-add -l" does it show all your key(s) loaded into the agent?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was working fine, all my keys are loaded and Sourctree with GitHub has stopped working, same error!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me worked this:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.