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

I am not able to clone or push to a git repository at Bitbucket in Eclipse:

Error 'cannot open git-upload-pack'

It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error keeps showing. Also I have installed SourceTree and it says 'This is not a valid source path / URL':

Error 'This is not a valid source path / URL' in sourcetree

If I use git commands to import the project, it works, but I wan't to use EGit for this task, since I am a newbie with git.

I don't know if this has to do with it, but in the same directory I have the android-adt-bundle. This one works pretty well, but the project lies on GitHub and not Bitbucket. Also, I'm working with another person and he is able to fetch and push data from and to the Bitbucket repository. I have read lots of posts but none of them have helped me out.

I'm using Windows 7 btw.

This question is related to eclipse git bitbucket egit atlassian-sourcetree

The answer is


The Solution to this in Eclipse Mars 4.5.2: Window -> Preferences -> Team -> Git -> Repository Settings -> AddEntry Key: http.sslVerify Value: false


i've tried all those methods but it didn't work then a workmate told me that Putty Key Generator used to generate keys with 1024 bits but now Putty generate 2048 bits keys by default , so you just need to change the "Number of bits in a generated key" and it should work.


This issue can be caused when you have a local firewall which is preventing your application from being able to send any network traffic away from your machine. I.e. Outbound traffic or egress traffic rules.

Please try disabling your firewall for a quick test to see if this fixes your issue. If it does then setup the appropriate firewall policy for the application you are trying to use to push or pull to a git repository.


I got this error message because I had a different user than what the repo expected in my git config.

This would obviously trigger the SSL Cert failures mentioned above.

Fixing to the correct user resolved this issue for me.


The repository owner should give you a contributor permission: Example


In my case I was not using the proper URL provided by the "clone" button in GitLab: GitLab button clone


I have to report another possibility, after ALL the previous ones:

I got "cannot open git-upload-pack" during eclipse GIT pull operation (through a proxy tunnel), so I have to try an access via browser to the same GIT URL, eventually authenticating correctly in the proxy, and only after via eclipse is possible to make the pull from GIT without any error. Hope useful.


For those who still have this problem, and none of the above solutions worked for you:
Update your versions of java and Eclipse.
In my case, I updated from java 7 to java 9, and Eclipse Mars to Eclipse Oxygen, and this problem was solved !!!


I got the similar problem. I just followed the below steps 1. Team > Remote > Configure Fetch from upstream... 2. Provide the https: bit bucket uri then Save and Fetch. 3. Reset the latest commit in your project. Team > Reset > Select the latest commit from remote folder 4. Then synchronize the workspace. Team > Synchronize (in synchronize perspective) 5. Right click on project and overwrite the local copy. 6. Click on Pull icon.


I had my proxy settings set up in Eclipse and wasn't connected via ssh, which was causing the error.


The problem can also be caused by wrong system time (by a couple of years), making the Git's certificate invalid.


Recently I got same problem with existing repository.when I try to fetch from upstream not able Fetched object and got problems eclipse: cannot open git-upload-pack.

for me following solution work after adding TLS version in eclipse.ini file

Dhttps.protocols=TLSv1.1,TLSv1.2

For java7 need to add TLSv1.1 and for java8 need to TLSv1.2

Note: Need to restart eclipse once above configuration added.


After struggling for a couple of hours, I found that git config file was not updated when I added the entry sslVerify = false in my Eclipse.

I solved my problem by navigating to my .git directory and updating the config file to :

[http]
    sslVerify = false

I just changed the Network settings from Native to Manual, restart and the error is gone.

I'm using RAD 8.0.4.3 with and old version of EGit connected to TFS/Git. ;-)

Eclipse Network Settings


I'm using Eclipse Kepler SR2 on Ubuntu 12.04LTS and was trying to access an internal GitHub using HTTPS. Unfortunately, my underlying JVM with which Eclipse was started experienced problems with the self-signed certificate of the server. Switching to a different JVM for Eclipse got the HTTPS connection to our GitHub working.

Create a simple Eclipse starter that uses a different JDK, e.g. with OpenJDK: /Eclipse_Kepler_4.4.2/eclipse -vm /usr/lib/jvm/java-6-openjdk-i386/jre/bin


I had same problem when using VPN. Simple fixed with restarting internet connection.


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


For the Eclipse running on IBM JDK the following 2 lines are mandatory in eclipse.ini after -vmargs:

-Dhttps.protocols=TLSv1.1,TLSv1.2
-Dcom.ibm.jsse2.overrideDefaultTLS=true


I finally solved this issue by disabling IPv6 on the network configuration

Screenshot of my network configuration

Note that I use a VPN connection. If you do too, you must restart it. I'm pretty sure that it will work even if you don't use a VPN.


to fix SSL issue you can also try doing this.

Download the NetworkSolutionsDVServerCA2.crt from the bitbucket server and add it to the ca-bundle.crt

ca-bundle.crt needs to be copied from the git install directory and copied to your home directory

cp -r git/mingw64/ssl/certs/ca-bundle.crt ~/

then do this. this worked for me cat NetworkSolutionsDVServerCA2.crt >> ca-bundle.crt

git config --global http.sslCAInfo ~/ca-bundle.crt

git config --global http.sslverify true


I just got this same error, "cannot open git-upload-pack", in Eclipse with a BitBucket repo trying to do a pull or a push. I resolved it by switching local branches (Team/Switch To) to the master branch and doing a pull, and then switching back to the branch I was working on and pulling again.


I added -Dhttps.protocols=TLSv1.1,TLSv1.2 to eclipse.ini and it's working. I use java 1.7


In my case, it turned out that global proxy settings in "Preferences->Network connections" were interfering with git. Which is kind of confusing, because git has dedicated property for proxy configuration. Anyway, I've added repository host to "Proxy bypass" list and the problem was gone.


i've had the same issue on Spring Tool Suite (STS) and turns out, all i had to do was update my proxy settings in STS network config.

window > preferences > General > Network Connections and on the dropdown select "Manual" from "Native".

Here, just add your proxy url, port and your credentials for http and https by clicking on edit. Apply and close.

Hope it works for you.


One cause of this is having Fiddler2 configured to decrypt HTTPS traffic. Close Fiddler2 and it should work fine.


I had a similar problem and a quick fix to your issue is to make sure that you set your JVM option in the eclipse.ini file to use jre7. Older Jre's come with an old local policy file and this will return errors. One quick note also is that you need to point to your javaw not java.

-vm c:\PROGRA~2\Java\jre745\bin\javaw.exe -vmargs -Xms40m -Xmx512m -XX:MaxPermSize=256m -Dsun.lang.ClassLoader.allowArraySyntax=true


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.


Add https.sslVerify as false...when you use https connection for importing from git


I got same problem when I got new laptop with Windows8/Kaspesky installed on it. I got problems eclipse: cannot open git-upload-pack. I also got problems with maven. I also got problem with Skype.

When I disabled Kaspersky everything started to work properly.


Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to git

Does the target directory for a git clone have to match the repo name? Git fatal: protocol 'https' is not supported Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) git clone: Authentication failed for <URL> destination path already exists and is not an empty directory SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 GitLab remote: HTTP Basic: Access denied and fatal Authentication How can I switch to another branch in git? VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio?

Examples related to bitbucket

How to markdown nested list items in Bitbucket? Your configuration specifies to merge with the <branch name> from the remote, but no such ref was fetched.? Bitbucket git credentials if signed up with Google What I can do to resolve "1 commit behind master"? Bitbucket fails to authenticate on git pull Change remote repository credentials (authentication) on Intellij IDEA 14 git: updates were rejected because the remote contains work that you do not have locally How do I push a local repo to Bitbucket using SourceTree without creating a repo on bitbucket first? Clone private git repo with dockerfile How to move git repository with all branches from bitbucket to github?

Examples related to egit

How to resolve conflicts in EGit Push eclipse project to GitHub with EGit Egit rejected non-fast-forward 'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository Eclipse EGit Checkout conflict with files: - EGit doesn't want to continue git stash and git pull How do I set up Eclipse/EGit with GitHub? "Auth Failed" error with EGit and GitHub

Examples related to atlassian-sourcetree

Git - remote: Repository not found How to integrate sourcetree for gitlab How to see remote tags? Sourcetree - undo unpushed commits How to rollback everything to previous commit Authentication failed to bitbucket Unknown SSL protocol error in connection How to discard uncommitted changes in SourceTree? How to switch to other branch in Source Tree to commit the code? 'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository