I'm trying to setup sourcetree 3 on a new Mac. I already had my SSH key created and added to GitHub prior to installing SourceTree. When i go into the accounts section in sourcetree and try to add my GitHub account with SSH, I get a message during the "connect" phase that says "There was a problem adding your new SSH key to your GitHub account". GitHub doesn't allow adding the same key twice so i tried removing it on their end but it still didn't help. I get the same message. Obviously source tree won't let me pull because of credentials errors. This was really easy with Personal Access tokens in SourceTree 2...what can I try in SourceTree 3 to get this to connect?
Thanks
You can login to GitHub on Sourcetree using OAuth and post that use either your own ssh key or a new ssh key generated from Sourcetree. If this key isn't already present on the host, it will be uploaded to GitHub by Sourcetree.
Lastly, Please check if the ssh-agent has your keys loaded. If not, please add them to the agent.
Run below commands in terminal to do so,
To check if keys are loaded:
ssh-add -l
To add keys to agent:
ssh-add <path_to_key>
more like,
ssh-add ~/.ssh/id_rsa
Key in the passphrase used while generating the ssh key and you should be good to go.
Thanks Manjunath,
For some reason my ssh key was not added to the agent. I thought this had been done. I added it successfully but it still doesnt fix the issue. I get authentication errors if a try to pull from my remote repo and if i go into the accounts panel and connect with github using my id_rsa.pub I get the same error saying "There was a problem adding your new SSH key to your GitHub account". I assume the error with adding the new key is because the key already exists on GitHub but if i delete the SSH key on GitHub, SourceTree still reports that there is an error adding it. So i do what it says and add it manually but still get nothing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
I am also facing same issue as yours.
Did you get any solution to this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure the origin is not using https and its just git@github SSH option. Had the same issue and at some point it made a weird switch.
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.