Unable to push to repository using GIT Extensions

19,678

Solution 1

Up front, I don't know if this has to do with it, but can't hurt to do. Go to Plugins -> Settings -> Github, and enter your details there. I found that it was blank there. What solved my problem is the following: In the .ssh folder that was under C:\Users\<my name>\.ssh, was my private key, as generated by the PuTTY program (.pkk file). What I did there was wrong, I shouldn't have created a new key.

Go ahead to <Git Extensions> Remotes -> PuTTY -> Generate or import key. Now, go to Conversions -> Import key. Browse to the .ssh folder, and find 'id_rsa' (it was named exactly that here, WITHOUT an extension). Select it, and press open. Enter the password for your key (this is the key that Git uses to communicate to the GitHub server, as it appears). Then, select Save Private Key, and save it somewhere (I did in the .ssh folder).

Now, go on and Push your changes. Press <Manage>. There, browse to your newly created private key. Then press Test Connection. That worked for me, it said 'Using username 'Git'\n Hi vname>' etc. <Save>, and then hit <Push>. It then worked for me.

Solution 2

You could try using OpenSSH instead of PuTTY.

Open Settings->Settings menu in GitExtensions main windows, select the Ssh tab and select OpenSSH in Specify which ssh client to use.

Share:
19,678

Related videos on Youtube

Wotuu
Author by

Wotuu

Updated on May 31, 2022

Comments

  • Wotuu
    Wotuu about 2 years

    I'm pulling my hair out right now because of this. I have downloaded and installed GIT, did the same for GIT Extensions (as we're going to be using it for VS2010), and everything worked fine and dandy. I committed changes, then found out my team members couldn't checkout from the website. Appears that I have to push my changes to the server.

    So here's the deal. When I try to push to the github.com website, I get the following error message:

    "Authentication error The command resulted with an error that usually means that th PuTTy authenticaion agent is not running.or that the correct private key is not (yet) loaded.

    When the key is loaded, you can press retry. 'Retry' 'Load SSH key' 'Abort'"

    I have created an SSH key, so I try to load it. I get to browse for my key, which I do. I press 'Load', then 'Retry'. Then, the same error appears.

    OK, so that doesn't work. I go to FileMenu Remotes -> PuTTY -> Start Authentication Agent. I get an error that it is already running, so that should be fine then. Going to Remotes -> PuTTY -> Generate or import key, shows me that it doesn't have a key loaded or anything, but I assume that that's fine as well then.

    Remotes -> Manage remote repositories. I get to see the URL of my repo, and the location of my .ssh key. Pressing 'Test Connection' will give me the following error:

    "Using username 'git' FATAL ERROR: Disconnected: No supported authentication methods available"

    So here I am, I can't push to the server because of above issues. I always solve problems on my own or find solutions on Google, but I'm left in the dark here, it just won't work. Anything that would help me get out of this Source Code Management disaster would be awesome, because I could just about kill anyone now.

    Thanks!

    Edit: I should note that the problems started when the push told me something like 'Unable to verify the server is actually the server, because I dont know the key of the server'. I then tried to troubleshoot that, which resulted in the above. Maybe that helps..

  • Wotuu
    Wotuu over 12 years
    Hi, thanks for your answer still. I had already figured out the problem, and posted the solution in the comments section of my first post. Upon advice of someone else, I've created a new answer and marked it as answered. Thanks again!
  • Withheld
    Withheld almost 10 years
    +1 Thanks for great instructions. BTW, with the latest Git Extensions, there is no longer a "Remotes" menu. It has been replaced by Tools.
  • vezenkov
    vezenkov about 9 years
    Nice tip for converting an OpenSSH id_rsa key to a Putty .ppk. Thanks!
  • Dariux
    Dariux about 9 years
    That does not work for me. Pressing test connection shoss "Using username "git" FATAL ERROR: Disconnected: No supported auythentication methods available (server sent: public key) "
  • Dariux
    Dariux about 9 years
    Wrote under one of answers in commebnt how I solved the problem stackoverflow.com/questions/4931384/…