Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to push to repository using GIT Extensions

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..

like image 702
Wotuu Avatar asked May 26 '11 12:05

Wotuu


People also ask

Why git push is not working?

If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.

Why can't I push code to GitHub?

To push a branch on remote, your branch needs to have the latest changes present in remote repository. If you get the failed to push error, first do git pull the branch to get the latest commits and then push it.


2 Answers

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.

like image 162
Wotuu Avatar answered Oct 06 '22 21:10

Wotuu


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.

like image 10
Arialdo Martini Avatar answered Oct 06 '22 21:10

Arialdo Martini