title: Git: Public key authentication failed
body: <p>When I want to use git on with azure devops (vsts) I can't use git clone, pull, push etc. I get the error:</p>
  
  <blockquote>
    <p>remote:
    remote: Your Git command did not succeed.
    remote: Details:
    remote:     Public key authentication failed.
    remote:
    fatal: Could not read from remote repository.</p>
  </blockquote>
  
  <p>But when I use the command below it works, so the problem is not the key.
  <code>ssh-agent sh -c 'ssh-add ~/.ssh/key; git push repo'</code> </p>
  
  <p>When I do a git clone, push, pull etc I thought it goes through your .ssh dir to automatically check which key to use. Anybody any idea on how to fix this?</p>