'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository 'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository git git

'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository


Might also be bad SSL cert, fix the server

If you have a GIT server with an outdated or self-signed SSL cert fix the server, afterwards everything should run fine.

Insecure Hotfix: Let the client accept any certificate

The following solution is just a mere hotfix on client side and should be avoided as it compromises security of your credentials and content. There is a detailed explanation for this in "How can I make git accept a self signed certificate?" which offers more complex and more secure solutions you can try out if the following works in general.

In my case it was Eclipse using a different storage for the git config as the command line does and thus not having the option

git config http.sslVerify false

set (which I set using command line for the repo for working with invalid/untrusted SSL cert).

Adding the option insides Eclipse immediately resolves the issue. To add the option

  1. open preferences via application menu Window => Preferences (or on OSX Eclipse => Settings).
  2. Navigate to Team => Git => Configuration
  3. click Add entry..., then put http.sslVerify in the key box and false in the value box.

Seems to be a valid solution for Eclipse 4.4 (Luna), 4.5.x (Mars) and 4.6.x (Neon) on different Operating systems.


It happens due to the following Reasons:

1) Firewall.

2) Network Issues.

3) Proxy Settings Mismatch

4) Connected through different Router - which is not authorized within the network.

5) Git Proxy Authentication Details


Finally I made it work thanks to the steps outlined in the Eclipse forum:

Set up the SSH key stuff

  1. Download and install mysys git according to the github instructions at http://help.github.com/win-git-installation/
  2. In C:/Users/you/ssh hide any existing keys (id_rsa and id_rsa.pub) in a subdirectory. If the ssh directory does not exist, create it. Of course, "you" is your username as the OS knows you.
  3. From the start menu, run Git-Bash command shell (a regular DOS command shell will not work).
  4. In the Git-Bash shell generate an rsa key based on your email (the one you registered at github):ssh-keygen -t rsa -C "you@wherever.com"and enter your pass phrase and confirm when asked.
  5. The previous step should have created C:/User/you/ssh/id_rsa.pub which you can now open in a text editor and copy. At github, go to account settings, SSH Keys, add a key and paste this in the key box.
  6. In Git-Bash again (notice the back-ticks in the next line):eval `ssh-agent`ssh-add C:/User/you/ssh/id_rsassh git@github.com

Here is what you just did: You ran the ssh-agent which is needed by ssh-add. Then you used ssh-add to make note of the location of your key. Then you tried to ssh to GitHub. The response to this last command should be that you have successfully authenticated at GitHub but that you don't have shell access. This is just an authentication test. If the authentication was not successful, you'll have to sort that out. Try the verbose version:

ssh -v git@github.com

Assuming this worked....

In Eclipse, configure the remote push

  1. Window > Show View > Git > Git Repositories will add a repository explorer window.
  2. In the repository window, select the repository and expand and right-click Remotes and choose Create Remote.
  3. Copy the GitHub repository URI from the GitHub repository page and paste it in the URI box.
  4. Select ssh as the protocol but then go back to the URI box and add "git+" at the beginning so it looks like this:

    git+ssh://git@github.com/UserName/ProjectName.git

  5. In the Repository Path box, remove the leading slash

  6. Hit Next and cross your fingers. If your get "auth fail", restart Eclipse and try step 5 again.
  7. When you get past the authentication, in the next dialog select "master" for source ref, click "Add all branches spec" and "Finish".

Instead of using SSH git@github.com I did it with SSH git@bitbucket.org.

Now I can push and import without any problem.