使用TortoiseGit拉取一個項目時,提示:git
Disconnected:No supported authentication methods available(server sent:publickey)github
或是ssh
Please make sure you have the correct access rights
and the repository exists.測試
可是發現若是直接用git命令卻能夠拉取成功。server
因此能夠肯定是TortoiseGit有問題,Git沒有問題,生成的ssh密鑰也沒有問題blog
找了下git的ssh.exe文件it
經過如下方法能夠修復TortoiseGitio
修改ssh client的路徑後,能夠正常使用TortoiseGitclass
附上git配置命令:email
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ ssh-keygen -t rsa -C 「johndoe@example.com」
按3個回車,密碼爲空。
在github上添加ssh密鑰,這要添加的是C:\Users\johndoc\.ssh目錄下 「id_rsa.pub」裏面的公鑰。
測試:ssh git@github.com