15

I have been using Gitlab without problems for a couple of months now. But, since yesterday, I can not "reach" (fetch, push,...) Gitlab from my Eclipse IDE anymore.

No matter whether I'm working in my firm (could have been a proxy problem) or at home.

I get the following error message :

https://gitlab.com/XXX/XXX.git: 
    cannot open git-upload-pack
    cannot open git-upload-pack

Looking at my Eclipse .log, the cause is :

Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
    at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:460)
    ... 10 more

Adding http.sslVerify=false in my Eclipse/Git configuration did not help...

Any idea why this is (suddenly) happening?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Laurent Le Moux
  • 241
  • 1
  • 2
  • 9
  • Maybe your certificates aren't complete, as in https://github.com/gitlabhq/gitlab-shell/issues/21#issuecomment-15537477 – VonC Sep 27 '14 at 08:34
  • I'm using the https protocol to connect to gitlab. As far as I know, no certificate declaration is needed. And it used to work perfectly until now. Moreover I found another problem... When I'm logged in my gitlab.com space, if I go to my project page and try to download it as a zip, I got a 16Mb file the first time. But now, when I try again I only get a 1Mb file back, whatever branch I try to download. Could these connection and download problems result of a configuration change of the gitlab.com web server ? Does anyone face the same problem ? – Laurent Le Moux Sep 27 '14 at 14:34
  • Yes, CA (certificate Authority) are involved with https (SSL certificate), as illustrated in http://stackoverflow.com/a/4454754/6309. But since `http.sslVerify=false` doesn't help, this is likely to be another issue. – VonC Sep 27 '14 at 14:54
  • I opened an issue for the Gitlab CE project : https://gitlab.com/gitlab-org/gitlab-ce/issues/624 – Laurent Le Moux Sep 29 '14 at 09:13
  • I'm getting the same error... It used to work perfectly since last couple of months but from last few days I'm not able to push from eclipse and I get the same error... cannot open git-upload-pack.. if you have found the solution please help! – Mayuri Ruparel Sep 30 '14 at 11:30
  • Could you please add this comment to the issue I opened ? Because I have no reaction from Gitlab community edition project until now... – Laurent Le Moux Sep 30 '14 at 15:34

6 Answers6

6

I've encountered a similar error with another Gitlab server. I dug into it and discovered that all of the available ciphers on the server were at least 256 bits. Standard Oracle Java ships with crypto that's restricted to 128 bits for some algorithms. After installing the unlimited strength crypto package from Oracle the issue went away.

Almost forgot, the unlimited strength package is only legally available in the US. If you're outside of the US then I think that OpenJDK will work instead.

jgibson
  • 1,013
  • 11
  • 9
  • Maybe it's worth to mention that [this solution also works for NetBeans IDE](http://stackoverflow.com/a/26236936/2541501). Thanks. – PJvG Oct 07 '14 at 13:20
  • 2
    I actually encountered the error when I realized that one of my Jenkins servers was unable to clone repositories from a GitLab server. Really this problem could be encountered by any Java program that attempts to access GitLab. – jgibson Oct 09 '14 at 05:23
  • @jgibson is correct; this impacted my TeamCity server. – jstark Nov 18 '14 at 20:18
0

As explained by @jgibson this seems related to the crypto algorithms

I did not try the unlimited strength crypto package but running Eclipse with Java 8.0.25 solved the issue for me.

Olivier.Roger
  • 4,241
  • 5
  • 40
  • 68
0

Ahh had this issue simply do this:

in eclipse, go to Windows->Prefrences->General->Network Connections->SSH

  • Click tab "Key management"
  • Click generate RSA key.
  • Click Apply -copy and paste everything in the box "sha-rsa ..." into gitlab->profilie-add SSH key

attempt clone again via ssh.

Jeryl Cook
  • 989
  • 17
  • 40
0

For me didn't help the prior posts, but i was able to fix this by changing the security options of Java. Under system settings you can find a "Java Control Panel" where the tab "Security" let you change the security level.

Dependent on the version you use, you see different options. It worked for me , after setting this to "low". But on different systems you might only have "high" / "very high" options. It depends on the installed Java versions.

0

enter image description here

i got the same error when github was down, this was due to the proxy settings of our network admin, i then again connected with another internet provider github was working fine

this solved my problem

EGit: cannot push, cannot pull

  1. changed the origin to my fork account and pulled.
  2. changed the origin back to the actual value and pulled.
Community
  • 1
  • 1
Mateen
  • 1,631
  • 1
  • 23
  • 27
  • also have a look at some countries are blocking github https://en.wikipedia.org/wiki/Censorship_of_GitHub – Mateen Oct 26 '16 at 07:09
0

I had the problem as well (cloning a git-repository), but using an old eclipse JUNO (32-Bit). The suggested solutions (-Dhttps.protocols=TLSv1.1,TLSv1.2, ssalVerify=false) did not change anything.

Finally I learned that I had to select "git:\\" as 'Protocol' in the Dialog "File->Import... Git, Projrects from git... URL..."

I with the actual (18.9) Version of eclipse I could use the http-ULR as is.

Dmytro Dadyka
  • 2,208
  • 5
  • 18
  • 31
Xantopp
  • 64
  • 7