开发者

git push origin master: ERROR: Disconnected: No supported authentication methods available

开发者 https://www.devze.com 2023-03-21 08:23 出处:网络
I have read the GitHub questions here rather thoroughly, but couldn\'t find the clue to my problem. I have created new git repo and now I\'m trying to push it to GitHub:

I have read the GitHub questions here rather thoroughly, but couldn't find the clue to my problem. I have created new git repo and now I'm trying to push it to GitHub:

git remote add origin git@github.com:clergyman/first_app.git
git push origin master

I get:

FATAL ERROR: Disconnected: No supported authentication methods available
fatal: The remote end hung up unexpectedly

开发者_运维知识库ssh git@github.com works fine.

I'm running on 32 bits windows 7.

GitHub global settings are fine too. Any ideas?


I ran into the same error message trying to get Git, Git Extensions, and GitHub working with 64-bit Windows 7. I was able to solve the problem while continuing to use Putty.

I created a .profile file in C:\Users\MyUserName with the following contents:

GIT_SSH="/c/Program Files (x86)/Git/bin/ssh.exe"

Had to use "touch .profile" within git bash to create the file since Windows GUI chastises you for trying to create files starting with period.

Can't take credit. I just put a windows spin on the answer provided here.


When I choose plink.exe to perform the authentication, Here are my steps

  1. use "puttygen.exe" to generate the public and private keys and save the private key in putty private key file format( filename.ppk ).
  2. Paste the public key generated in "puttygen.exe" into github account setting.
  3. Launch pageant.exe (Putty Authentication Agent) , and add the private key generated in step 1.


The solution is somehow change default ssh client for git from pegeant to openSsh. E.g. reinstall git and check openSSH in the corresponding window (not pegeant or something), if you have just installed git and haven't started to work woth it yet.


Could the section "No supported authentication methods available" on GitHub help at all?

You should be aware of the environment variable GIT_SSH, which is used by git to find your ssh-speaking client, if ssh doesn’t work for you.
The git install may be using plink.exe (via GIT_SSH) to perform the authentication.
If so, make sure you have pageant.exe running, and the key you created for github loaded into it. This provides the key to plink.exe; without it, the above error will occur.

See this post for a longer discussion.


Have you properly set up your ssh keys on github?

You need to create a ssh key, and put your public key on github. The two top references are

http://help.github.com/mac-set-up-git/

and

http://help.github.com/ssh-issues/


My co-worker have this error crop up on him today using TortoiseGit. He had inadvertently moved his Putty Private Key file (myprivatekey.ppk) into a different folder. So ensure the path to your private key file is correct. In TortoiseGit, go to Settings...Git...Remote. See the screenshot below:

git push origin master: ERROR: Disconnected: No supported authentication methods available

0

精彩评论

暂无评论...
验证码 换一张
取 消