Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No supported authentication methods available (server sent: publickey)

I have created ssh key using the command ssh keygen and I have added the public key to my bitbucket account and then I have added the key to the ssh agent also, But when I tried to clone repo from bitbucket using sourceTree, I am getting the below Error.

Error: FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

and I know this is repeated question but those solution didn't worked for me, So please help.

like image 738
SjVnyk Avatar asked Oct 21 '17 11:10

SjVnyk


2 Answers

Well, It was my mistake actually, SSH Client type was set to PuTTY/Plink in my SourceTree Settings, So I changed it to openSSH and now that issue is no more. Sorry & Thanks.

like image 109
SjVnyk Avatar answered Nov 12 '22 13:11

SjVnyk


I am using SourceTree to access an enterprise GitHub server, and had the same issue all of a sudden start occurring to me even though it has been working fine for over a year and nothing had changed. Apparently, somehow my SSH Client Type was swapped to PuTTY/Plink. Switching it to openSSH again fixed the issue for me by going to Tools -> Options -> General -> then selecting OpenSSH as the SSH Client under the SSH Client Configuration section.

like image 3
Aaron Biggs Avatar answered Nov 12 '22 14:11

Aaron Biggs