You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Can see all repos on github and bitbucket. SSH generated through sourcetree and set up on the websites. However everytime i try to push to repo that was started locally to newly created remote one. I keep getting error:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream [changed] refs/heads/master:refs/heads/master
Pushing to firstname.lastname@example.org:[changed]/[changed].git
Permission denied (publickey).
fatal: Could not read from remote repository.
P.S. $ ssh -T email@example.com fails.
ssh sored in [username]-Bitbucket.pub but it looks that when it testing ssh, it does not try this one..
Hi Ana, I can't try that now as I made it working by:
1. Manually deleting SourceTree generated keys froms ~/.ssh
2. Generating new key in ~/.ssh/id_rsa
3. using cat ~/.ssh/id_rsa.pub | pbcopy. As when under user settings in SourceTree it was changed to use id_rsa ssh. When pressing copy to clipboard, it copied:
4. Changing config files in both ~/.ssh and project /.git
It still puzzles me why it did not work with key generated through SourceTree.
Hi Laurynas, can you confirm that you followed the steps at Repository setup?
Also, make sure you're using the right username and the right key. You can see which username is trying to authenticate using:
git -Tv firstname.lastname@example.org
You can list the available SSH keys using
Let us know!
Seeing your comment about ssh-add I decided to run ssh-add on the key stored in ~/.ssh/<key name> (it wasn't in id_rsa).
That fixed it for me. After running ssh-add <file name> I was good to go. Now it shows up when I run ssh-add -l.
Then I found this question here where the answer says to do just that: https://community.atlassian.com/t5/Bitbucket-questions/Pushing-to-Remote-Erroring-SourceTree/qaq-p/711161
So my question is, why aren't the ssh keys generated by Sourcetree not getting added to ssh-agent?