Git SSH public key authentication failed with git on Azure DevOps

后端 未结 10 1565
醉酒成梦
醉酒成梦 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:42

    When you paste in the key on the settings page of Azure DevOps don't change anything including the space appended at the end of the public key.

    0 讨论(0)
  • 2021-01-04 03:45

    Before this I had already tried the other answers, but nothing worked. At last, this article had the solution for me in Fedora.

    Running ssh with the -v switch (ssh -v -T git@ssh.dev.azure.com) revealed this error:

    debug1: send_pubkey_test: no mutual signature algorithm
    

    Workaround is to add this line to the client configuration file (~/.ssh/config):

    PubkeyAcceptedKeyTypes +rsa-sha2-256,rsa-sha2-512
    
    0 讨论(0)
  • 2021-01-04 03:45

    Sign into your Azure DevOps. Go to Repos > Files, then click Clone. Finally, under the HTTPS tab, click Generate Git Credentials.

    0 讨论(0)
  • 2021-01-04 03:47

    I have the same problem.

    My solution was:

    The path while I try to use sudo git clone... doesn't have permission to access my public and private key location: \home\localuser\.ssh\....

    To solve this, I change ownership of the destination path to the same user:group ware my keys are stored and avoid to use sudo git clone...., now im using git clone without sudo and everything works.

    I hope you understand...

    0 讨论(0)
提交回复
热议问题