tags:

views:

166

answers:

2

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 supported authentication methods available" after running:

git pull origin master (or push)

however

ssh [email protected] returns the correct response: ERROR: Hi username! You've successfully authenticated, but GitHub does not provide shell access Connection to github.com closed.

after digging around on github i found this morcel:

No supported authentication methods available 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.

not sure what plink.exe or peagant.exe is.. and the fact that ssh [email protected] seems to authenticate correctly makes me wonder what the best solution here is.. i certainly don't want to overcomplicate my setup if not necessary.

A: 

You can get plink & pageant from here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

They are PuTTY tools.

eabrand
+1  A: 

You can create a file named ".profile" in your home directory, for me that's C:\Users\[user]

Inside that file, put the following line of code:

GIT_SSH="/usr/bin/ssh.exe"

This will set the GIT_SSH environment variable to use the ssh client included with git.

The .profile script gets executed when you start your Git Bash command line.

RexM
+1 I've had nothing but problems when using Putty/Pageant for git's ssh needs. Using the built in ssh client works wonders. This explains why ssh [email protected] returns fine if you execute it yourself, but letting git use the configured tools (Putty/Pageant) doesn't.
enriquein