11

I'm having trouble authenticating via ssh from my MacBook to my Azure DevOps git repository. I have setup my ssh keys as described here https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=vsts , and am attempting to clone my repo via the ssh url provied in my account.

git clone myorg@vs-ssh.visualstudio.com:v3/myorg/my-repo/my-repo

but I keep getting an authentication error.

remote: Public key authentication failed.

bingles
  • 11,582
  • 10
  • 82
  • 93
  • Please make sure you have the correct access rights and the repository exists. After you've checked for existing SSH keys, then you can generate a new SSH key to use for authentication, then add it. – IMParasharG Jan 05 '19 at 14:59
  • check this https://learn.microsoft.com/en-us/azure/devops/repos/git/set-up-credential-managers?view=vsts – IMParasharG Jan 05 '19 at 15:01
  • Do you have any update about this thread? If it is useful, you could mark it as an answer. – Tom Sun - MSFT Jan 24 '19 at 01:57
  • I do not. I was not able to resolve this issue. I have created private / public key pairs many times successfully so not sure what’s going on. – bingles Jan 24 '19 at 12:43

1 Answers1

62

Add IdentitiesOnly yes to ~/.ssh/config

It is incredibly annoying because Microsoft assumes that everyone is an idiot and must have supplied the wrong public key. They just ignore all the people reporting this problem.

Also, I believe this question is a duplicate of the following:

`ssh -T` to VSTS(Azure Devops) authenticates successfully, but `git clone` fails

Jack Davidson
  • 4,613
  • 2
  • 27
  • 31