Reputation: 1286
Hello, if i try to connect with bitbucket.org using ssh
ssh -vT [email protected]
Everything works fine
debug1: Authentication succeeded (publickey).
But if i try to use the git clone
command i recive this message:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Some extra information:
~/.ssh/
ssh-add -l
returns the correct key. (RSA)Upvotes: 3
Views: 14765
Reputation: 104
The example mentioned in atlassian support site was using Ed25519 key with 4096 bits. I could resolve this permission denied(publickey) by switching to RSA.
Generate the ssh key as -
ssh-keygen -t rsa -C [email protected]
Upvotes: 0
Reputation: 1
Start the ssh agent if it is not set up to run automatically by running following command on powershell (run as administrator)
Start-Service ssh-agent
Upvotes: 0
Reputation: 633
I found similiar problem and the solution is here
I just added two properties, IdentitiesOnly
and PubkeyAcceptedKeyTypes
in ssh config.
Host bitbucket.org
HostName bitbucket.org
IdentityFile /home/me/.ssh/id_rsa_bitbucket
IdentitiesOnly yes
PubkeyAcceptedKeyTypes +ssh-rsa
Please note that there is security concern regarding this solution as mentioned in the link above
Upvotes: 5
Reputation: 2932
This answer helped me more for this exact problem, than the accepted answer: Git looking for my SSH key in the wrong location
Upvotes: 1
Reputation: 1286
I was able to make this work, but there was multiple problems with my git implementation:
git clone
with the pattern [email protected], after trying with git@bitbucket.org everything worked.I hope this helps someone with the same problem i had.
Upvotes: 2