Git SSH public key authentication failed with git on Azure DevOps

后端 未结 10 1563
醉酒成梦
醉酒成梦 2021-01-04 03:10

I am trying to push a git repo from PowerShell into an Azure DevOps repo, and I keep getting different auth errors when trying to push it.

I am hoping somebody can sh

10条回答
  •  被撕碎了的回忆
    2021-01-04 03:39

    I saw my repo ssh URL which was different from my DevOps URL in my case what worked was adding the config file in my ~/.ssh folder with the following information:

    Host vs-ssh.visualstudio.com <-- hostname found in my repo SSH URL
        IdentityFile ~/.ssh/id_rsa_vsonline <-- your key name
        IdentitiesOnly yes
    

    then tested it with

    ssh -v vs-ssh.visualstudio.com
    

    in the trace, I got something like

    Authenticated to vs-ssh.visualstudio.com ([IP]:22).

提交回复
热议问题