No supported authentication methods available (server sent: publickey)
Asked Answered
S

5

13

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.

Sienkiewicz answered 21/10, 2017 at 11:27 Comment(0)
S
16

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.

Sienkiewicz answered 21/10, 2017 at 12:38 Comment(2)
Do you have any idea why this is not enough for me? I changed the SSH Client Type as you indicated, but I keep getting that error.Sedimentation
Thank you very much. I had the same problem and this fixed it quicklyHandmade
P
3

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.

Pomona answered 12/4, 2022 at 16:16 Comment(0)
S
2

Changing the SSH Client type to openSSH in Source Tree - tools -> Options -> General solved this error for me.

Stewardess answered 28/7, 2021 at 0:42 Comment(1)
Please provide a detailed explanation to your answer, in order for the next user to understand your answer better.Argillaceous
T
1

(I posted the following to atlassian.com bug report)

We had the same issue. We noticed that the Pageant (in the icon tray) would not start.

For us it appears that our antivirus was blocking it somehow. Thus we do the following:

  1. disabled the antivirus
  2. uninstall SourceTree (SourcetreeEnterpriseSetup_3.4.6.msi)
  3. installed SourceTree (SourceTreeSetup-3.4.6.exe)
  4. reconfigured SourceTree
  5. We noticed that Pageant was now running and ssh calls worked.
  6. Reenabled the antivirus.

So far so good.

Torr answered 27/10, 2021 at 19:5 Comment(0)
G
1

In my case, I was getting same error but the "pageant" program installed was very very old, but worked after updating it (via the putty installer). Credit to https://superuser.com/users/106302/fabian @ https://superuser.com/a/404286/658383

Gilemette answered 4/7, 2022 at 3:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.