Hello, if i try to connect with bitbucket.org using ssh
ssh -vT git@bitbucket.org
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) I was able to make this work, but there was multiple problems with my git implementation:
git clone
with the pattern USER@bitbucket.org, after trying with git @bitbucket.org everything worked.I hope this helps someone with the same problem i had.
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
这个答案比公认的答案更能帮助我解决这个确切的问题: Git 在错误的位置寻找我的 SSH 密钥
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.