Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Unable to clone repo in 5.10
Unable to clone repo in 5.10 [message #1836871] Sat, 16 January 2021 11:48 Go to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
index.php/fa/39743/0/
Hello,

I downloaded the latest egit plugin 5.10 (Git integration for Eclipse 5.10.0.202012080955-r (org.eclipse.egit.feature.group 5.10.0.202012080955-r), tried to clone a repo, and got the Trasnport error (please see screenshot).

I downgraded it to 5.9 ( Git integration for Eclipse 5.9.0.202009080501-r org.eclipse.egit.feature.group Eclipse EGit), then was able to pull, which leads me to believe that there is some code difference / configuration in 5.10 that's causing this.

I don't even know how to start troubleshooting this. Where / what can I check?

Thank you for your help in advance.

Thanks,
May
  • Attachment: image.jpg
    (Size: 76.30KB, Downloaded 509 times)
Re: Unable to clone repo in 5.10 [message #1836899 is a reply to message #1836871] Mon, 18 January 2021 10:17 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
For one, there should be exceptions with stack traces in the log. What do they show?

What Java version is your Eclipse running with?

What does the full error message shown in the "Clone Git Repository" dialog say?
Re: Unable to clone repo in 5.10 [message #1836908 is a reply to message #1836899] Mon, 18 January 2021 13:58 Go to previous messageGo to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
Found this:
java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/DefaultHostnameVerifier
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getSSLSocketFactory(HttpClientConnection.java:156)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getClient(HttpClientConnection.java:128)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.execute(HttpClientConnection.java:260)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getResponseCode(HttpClientConnection.java:237)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:208)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:510)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:362)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:167)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:128)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$9.run(SourceBranchPage.java:375)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.ssl.DefaultHostnameVerifier cannot be found by org.eclipse.jgit.http.apache_5.10.0.202012080955-r
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

Java version was 1.8.0_202

The error in the Clone Git Repository Branch Selection window looks the same as the stack trace above.
Re: Unable to clone repo in 5.10 [message #1836909 is a reply to message #1836908] Mon, 18 January 2021 14:01 Go to previous messageGo to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
Just tried it again, it came with a very similar message, but slightly different:

!ENTRY org.eclipse.egit.ui 4 0 2021-01-18 13:59:03.307
!MESSAGE org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
!STACK 0
java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at org.eclipse.jgit.transport.http.apache.HttpClientConnection$1.<init>(HttpClientConnection.java:166)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getSSLSocketFactory(HttpClientConnection.java:166)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getClient(HttpClientConnection.java:128)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.execute(HttpClientConnection.java:260)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getResponseCode(HttpClientConnection.java:237)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:208)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:510)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:362)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:167)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:128)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$9.run(SourceBranchPage.java:375)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Re: Unable to clone repo in 5.10 [message #1836910 is a reply to message #1836908] Mon, 18 January 2021 14:17 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
That sounds like bug 570147, but your case seems to be different, since with 5.9.0 it works.

Which Eclipse version are you using?

What version of the bundle org.apache.httpcomponents.httpclient is active in your Eclipse?

I suspect this is caused by a wrong lower version bound in JGit. You could try installing the newest org.apache.httpcomponents bundles from the EGit update site (category "EGit dependencies").
Re: Unable to clone repo in 5.10 [message #1836913 is a reply to message #1836910] Mon, 18 January 2021 15:24 Go to previous messageGo to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
Eclipse version is 4.6.3.
org.apache.httpcomponents.httpclient is 4.3.6.v201511171540

I'll try having a look for the latest httpcomponents. Will report back to see if it works!
Thanks for the pointers!
Re: Unable to clone repo in 5.10 [message #1836915 is a reply to message #1836913] Mon, 18 January 2021 15:30 Go to previous messageGo to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
index.php/fa/39746/0/Actually there are 2 versions of the http client..?
  • Attachment: Capture.JPG
    (Size: 29.20KB, Downloaded 430 times)
Re: Unable to clone repo in 5.10 [message #1836916 is a reply to message #1836915] Mon, 18 January 2021 15:47 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Thanks a lot! That confirms my suspicion. I've opened bug 570451 for this. Once that wrong lower bound in JGit is fixed, it should pull in httpclient 4.5.10 and httpcore 4.4.12 (and commons.codec 1.14.0) automatically when JGit is installed. (If no httpclient 4.4.x and httpcore 4.3.x exist already.)

Don't know where the 4.5.10 version comes from, I guess nothing uses it since you don't seem to have httpcore 4.4.x.
Re: Unable to clone repo in 5.10 [message #1836918 is a reply to message #1836916] Mon, 18 January 2021 15:55 Go to previous messageGo to next message
May Kwok is currently offline May KwokFriend
Messages: 6
Registered: January 2021
Junior Member
Just to clarify...
I've had a look at all the ones that you mentioned, I do actually have httpclient 4.5.10, httpcore 4.4.12 and commons.codec 1.14.0

Does it look like I have everything that I should need but it's still not working somehow?

index.php/fa/39747/0/
  • Attachment: Capture2.JPG
    (Size: 128.70KB, Downloaded 459 times)
Re: Unable to clone repo in 5.10 [message #1836921 is a reply to message #1836918] Mon, 18 January 2021 16:55 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Hm. JGit mistakenly claims it was happy with any httpclient in the range [4.3.0, 5.0.0). It isn't, it needs at least httpclient 4.4.0. Perhaps the OSGi framework wires it to use the 4.3.6 httpclient even though the newer version 4.5.10 is also available.

I don't know what could be done to resolve this problem except fixing this wrong lower bound in JGit and then installing an EGit nightly that has this fixed JGit.

A work-around that side-steps this problem is to switch the HTTP client in the EGit preferences from Apache to JDK.
Re: Unable to clone repo in 5.10 [message #1836923 is a reply to message #1836921] Mon, 18 January 2021 18:46 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
EGit nightly contains a fixed JGit now. I just installed it into an Eclipse Neon.3 and got EGit 5.11.0.202101181758 and JGit 5.11.0.202101181723, as well as the correct Apache bundles, and JGit uses the new Apache bundles and can clone via http using Apache HTTP.
Previous Topic:"Replace with HEAD revision" does not work during interactive rebase
Next Topic:[Feature Request] Method to explicitly set the auth method
Goto Forum:
  


Current Time: Thu Mar 28 09:36:52 GMT 2024

Powered by FUDForum. Page generated in 0.04126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top