Suddenly getting "No supported authentication methods available" when pushing to github

GitGithubTortoisegit

Git Problem Overview


I started a github project a few weeks ago. I was able to push changes without any problems (I'm using TortoiseGIT).

Suddenly today when I tried to push my changes, I got "PuTTY Fatal Error" "Disconnected: No supported authentication methods availble" error window.

Anything you can recommend to remedy the problem?

Git Solutions


Solution 1 - Git

For me there was a problem to perform actions against the remote repository only when using TortoiseGit, through CMD / GitBash there have been no issue at all.

So what I did was Very simple: I opened TortoiseGit-->Settings --> Network and in SSH Client I changed to "C:\Program Files\Git\usr\bin\ssh.exe" instead of "TortoiseGitPlink.exe".

Solution 2 - Git

Make sure you installed TortoiseGit with OpenSSH and that you use the SSH authentication method. If you installed with Putty, there may be a "computer symbol" in the systray called "Putty Pageant".

Solution 3 - Git

For TortoiseGit Users on Windows
(as I originally posted in this question)

I used to setup most of my Github/Bitbucket repositories using the SSH repository URLs as (originally) it used to be the only convenient way to prevent TortoiseGit from prompting for your password on every single action.

But setting TortoiseGit up this way was always hair-pullingly painful. Every time it took me hours to set up correctly, as the default installation options never seemed to work (even as of 2016, sheesh!).

But TortoiseGit now has better password management for HTTPS, and Github actually recommends using HTTPS URLs wherever possible.

> SSH URL: [email protected]:User/repo-name.git > > HTTPS URL: https://github.com/User/repo-name.git

The benefits of HTTPS are:

  • No managing or generating of SSH keys
  • No need to have pageant.exe constantly running (which requests your password on each launch)
  • Using TortoiseGit from Australia, I find that clones over HTTPS are 5-10x faster than SSH

Solution 4 - Git

I was able to fix this error by adding the private key into Pageant. I forgot to do this during the key creation, and once I added it I no longer received the error.

Solution 5 - Git

In my case, Tortoise Git lost PuttyKey. So I had to go to TortoiseGit settings > Git > Remote and in this section I clicked on Remote frame my origin and PuttyK Key was not set (It was before). I had to set it up again.

Solution 6 - Git

To fix this, I had to manually run Pageant from the start menu:

image description

Afterwards, I saw pageant in the system tray:

image description

I could add my key. Normally, keys are in %userprofile%\.ssh.

Solution 7 - Git

I figured it out - it happened because I reinstalled TortoiseGIT since starting to work on the project. Pulls went smoothly, but as soon as I tried to push back my changes TortoiseGIT needed my authentication key, which was not configured.

Edit

To resolve, I simply cleared all authentication data from my TortoiseGit, under: Context menu "Tortoise Git" -> Settings -> Saved Data -> Authentication data [Clear]

Solution 8 - Git

[WINDOWS] [Same problem with GIT(1) installed after TORTOISE SVN]
(1)not TortoiseGit but the Git development community version.

In git bash :

    echo $GIT_SSH

was giving

    GIT_SSH=C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe

(Thanks to Răzvan Flavius Panda and Shahar Hamuzim Rajuan, above).

I had to change the value of GIT_SSH in the Windows system environment variables from

from   C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe
to     C:\Program Files\Git\usr\bin\ssh.exe

(Before, I tried successfully in git bash to type :

    export GIT_SSH='C:\Program Files\Git\usr\bin\ssh.exe'

So we could add this line in C:\Program Files\Git\etc\bash.bashrc for the change to be permanent. Note that modifying GIT_SSH in C:\Program Files\Git\setup.ini fails)

Solution 9 - Git

For me I was getting this error after upgrading GIT to 2.8.0. The issue was due to the $HOME directory being incorrectly read by bash and defaulting to some system location under the windows installation folder: /c/Windows/system32/config/systemprofile.

Turns out that a little environment variable cleanup was required. A long while ago I had installed a version of GIT (about 1.7.x) which had created a HOME variable in the system environment variables. This needed to be removed after upgrading to 2.8.0 due to some change in behaviour, rather than adding a further HOME user environment variable.

Solution 10 - Git

In my case, when I unchecked and checked the AutoloadPutty key it got resolved.

Solution 11 - Git

See my post here. I had this problem just now and tried everything posted here but I couldn't solve it. At the end was this exact same problem related to an existing PuTTy configuration => [https://stackoverflow.com/questions/6225916/tortoisesvn-keeps-on-asking-me-for-my-password/35561015#35561015]

Solution 12 - Git

I had this same error, which randomly occurred out of the blue after having successfully pushed to my repository over many months. In my case, in Tortoisegit->Settings->Git->Remote, the Push URL field was somehow empty.

Solution 13 - Git

As a new user I had the same error with GitLab and Eclipse when creating new projects. As a student I use different PCs and had issues with my keys but thought it was resolved as I created a new clean set and my last project is working well. Unfortunately the error occurred again on a new project.

I discovered that creating a new Eclipse project defaulted to my ssh directory rather than the .ssh I am using on my current project. I used the ssh directory initially but after issues changed to .ssh with new keys.

Changing to the .ssh in Window > Preferences > General > Network Connections > SSH2 fixed the problem.

I am posting this as I have spent a lot of time looking for help with my keys and have not found anything that related to my problem.

Solution 14 - Git

I changed to C:\Program Files\Git\usr\bin\ssh.exe instead of TortoiseGitPlink.exe and saved. And changed it back to TortoiseGitPlink.exe and it solved this error.

Solution 15 - Git

make sure when cloning that the check box "load putty key" is checked if not checked it will give the same error

Solution 16 - Git

For me, I had to update my version of "msysgit" to a 1.7.10+ version. Once done I did not face the above mentioned error. I think you might need to check if you have installed msysgit and if not there install it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionripper234View Question on Stackoverflow
Solution 1 - GitShahar Hamuzim RajuanView Answer on Stackoverflow
Solution 2 - GitGerold MeisingerView Answer on Stackoverflow
Solution 3 - GitSimon EastView Answer on Stackoverflow
Solution 4 - GitQAZZYView Answer on Stackoverflow
Solution 5 - GitPrusdrumView Answer on Stackoverflow
Solution 6 - GitTomáš Zato - Reinstate MonicaView Answer on Stackoverflow
Solution 7 - Gitripper234View Answer on Stackoverflow
Solution 8 - GitfredglxView Answer on Stackoverflow
Solution 9 - GitianbeksView Answer on Stackoverflow
Solution 10 - GitSujithaMerigaView Answer on Stackoverflow
Solution 11 - GitpacomixView Answer on Stackoverflow
Solution 12 - GitDanView Answer on Stackoverflow
Solution 13 - GitRooView Answer on Stackoverflow
Solution 14 - GitKamoddView Answer on Stackoverflow
Solution 15 - GitissamView Answer on Stackoverflow
Solution 16 - GitR11GView Answer on Stackoverflow