Reputation: 3254
OS - Windows 7.
I installed Source Tree, and I have account on Bitbucket.
I generated SSH key in Source Tree, saved public key as test.pub
and private key as test_private.ppk
in .ssh
folder, and added private key in Pageant.
Also I copied ssh key and saved it in Bitbucket settings.
When I use Source Tree interface, commits and pushes work just fine but when I try to use console, I get an error Permission denied (publickey)
What's the problem?
Upvotes: 0
Views: 1307
Reputation: 25926
You need to tell ssh where to find your keys using -i switch to ssh or rather using ssh_config so even git will know them.
ssh -i test_private.ppk -T [email protected]
should work work for you. Adding the line
IdentityFile test_private.ppk
to your ssh_config
should solve the issue for both cases.
Upvotes: 1