git push origin master:错误:已断开连接:没有可用的支持的身份验证方法

Cle*_*man 8 git github

我在这里已经非常彻底地阅读了GitHub的问题,但是找不到我的问题的线索.我创建了新的git repo,现在我正在尝试将它推送到GitHub:

git remote add origin git@github.com:clergyman/first_app.git
git push origin master
Run Code Online (Sandbox Code Playgroud)

我明白了:

FATAL ERROR: Disconnected: No supported authentication methods available
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

ssh git@github.com工作良好.
我在32位Windows 7
上运行.GitHub全局设置也很好.有任何想法吗?

小智 7

当我选择plink.exe来执行身份验证时,这是我的步骤

  1. 使用"puttygen.exe"生成公钥和私钥,并将私钥保存为putty私钥文件格式(filename.ppk).
  2. 将"puttygen.exe"中生成的公钥粘贴到github帐户设置中.
  3. 启动pageant.exe(Putty Authentication Agent),并添加在步骤1中生成的私钥.


小智 6

我遇到了同样的错误消息,试图让Git,Git Extensions和GitHub使用64位Windows 7.我能够在继续使用Putty的同时解决问题.

我在C:\ Users\MyUserName中创建了一个.profile文件,其中包含以下内容:

GIT_SSH="/c/Program Files (x86)/Git/bin/ssh.exe"
Run Code Online (Sandbox Code Playgroud)

不得不在git bash中使用"touch .profile"来创建文件,因为Windows GUI会惩罚你尝试创建以句点开头的文件.

不能信用.我只是在这里提供答案的窗口旋转.


Cle*_*man 5

该解决方案以某种方式将git的默认ssh客户端从pegeant更改为openSsh.例如,重新安装git并在相应的窗口(不是pegeant或其他东西)中检查openSSH,如果你刚刚安装了git并且还没有开始工作.