github: No supported authentication methods available

前端 未结 16 827
挽巷
挽巷 2020-11-29 16:46

i use github and have successfully added and synched files on my laptop in the past.

as of recent i started getting \"PuTTY Fatal Error: Disconnected: No su

16条回答
  •  攒了一身酷
    2020-11-29 16:59

    I encountered this same problem, however the GIT_SSH solution appeared to work once for me. After a computer restart I realized it was something else, as I was able to clone my private repositories with no problem using Git Bash or Command Prompt, but not in Sublime Text 3 with the SublimeGit plugin. My solution was simple and is actually what @BlueRaja - Danny Pflughoeft mentioned but I thought it could use some direction ;)

    Basically you just need to edit ~/.ssh/config and ensure the username is git. You can also tell it to use a specific SSH key for Github -- My ~/.ssh/config file looks like the following:

    Host gh
        Hostname github.com
        User git
        IdentityFile ~/.ssh/github_rsa.pub
    

    I have a specific key for Github due to the number of other things I do throughout my day, but if you've only got one then it usually will be ~/.ssh/id_rsa.pub like Github explains here.

    I know everyone has a different solution, but I'll leave this here for anyone who may encounter this article without a fix. Good luck!

提交回复
热议问题