Friday, March 16, 2018

Solution to Eclipse Mars 2 error during Push to Github: Cannot open git-receive-pack

If you suddenly encountered an error like below when you use Eclipse Mars 2 to push to github, with Java 1.7 installed.

An exception occurred during push on URI https://github.com/[username]/[repoid] : cannot open git-receive-pack

And your accompanying Eclipse information look like this

eclipse.buildId=4.5.2.M20160212-1500
java.version=1.7.0_80
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_ID
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

This solution may be prove useful to you:
  • Edit eclipse.ini file located in your Eclipse folder installation
  • Add the following line to the file

    -Dhttps.protocols=TLSv1.2
  • Save and restart Eclipse
It should work fine now. Good luck!