Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Unable to clone repo in ssh or https in 5.12
Unable to clone repo in ssh or https in 5.12 [message #1840404] Wed, 14 April 2021 14:22 Go to next message
Bill Babcock is currently offline Bill BabcockFriend
Messages: 8
Registered: January 2021
Junior Member
Hi Folks,

ENV:
OSX v 11.1 (20C69)
Eclipse: Version: 2020-12 (4.18.0), Build id: 20201210-1552
E/JGIT: Git integration for Eclipse 5.12.0.202104110038 org.eclipse.egit.feature.group Eclipse EGit

I think I'm seeing an issue similar to this:
https://www.eclipse.org/forums/index.php/m/1836909

When I tried to push changes to a branch in a repo which had been working fine up until my latest eclipse update (maybe the previous one tbh - I've been doing docs and so I think I autoupdated in eclipse twice in the past week) I was getting errors. git operations from the commandline worked fine. So I decided to try and start fresh and removed the local branch and repo from eclipse, restart and try again.

When I try and clone the repo via ssh, I now get this error:

eclipse.buildId=4.18.0.I20201202-1800
java.version=15.0.2
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -keyring /Users/billbabcock/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -data file:/Users/billbabcock/Documents/ -product org.eclipse.epp.package.jee.product -keyring /Users/billbabcock/.eclipse_keyring

org.eclipse.egit.ui
Error
Wed Apr 14 10:07:17 EDT 2021
git@github.REDACTED:REDACTED/REDACTED.git: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedOperationException) to execute: remove

org.eclipse.jgit.api.errors.TransportException: git@github.REDACTED:REDACTED/REDACTED.git: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedOperationException) to execute: remove
	at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:189)
	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:122)
Caused by: org.eclipse.jgit.errors.TransportException: git@github.REDACTED:REDACTED/REDACTED.git: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedOperationException) to execute: remove
	at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:250)
	at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:1)
	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:281)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:153)
	at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:167)
	... 4 more
Caused by: org.apache.sshd.common.SshException: DefaultAuthFuture[ssh-connection]: Failed (UnsupportedOperationException) to execute: remove
	at org.apache.sshd.common.future.AbstractSshFuture.lambda$verifyResult$1(AbstractSshFuture.java:131)
	at org.apache.sshd.common.future.AbstractSshFuture.formatExceptionMessage(AbstractSshFuture.java:185)
	at org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:130)
	at org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39)
	at org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32)
	at org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:68)
	at org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:164)
	at org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:99)
	at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:237)
	... 9 more
Caused by: java.lang.UnsupportedOperationException: remove
	at java.base/java.util.Iterator.remove(Iterator.java:102)
	at org.eclipse.jgit.internal.transport.sshd.JGitKexExtensionHandler.handleServerSignatureAlgorithms(JGitKexExtensionHandler.java:147)
	at org.eclipse.jgit.internal.transport.sshd.JGitKexExtensionHandler.handleKexExtensionRequest(JGitKexExtensionHandler.java:108)
	at org.apache.sshd.common.kex.extension.KexExtensionHandler.handleKexExtensionsMessage(KexExtensionHandler.java:160)
	at org.apache.sshd.common.session.helpers.AbstractSession.handleKexExtension(AbstractSession.java:625)
	at org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:483)
	at org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:428)
	at org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1463)
	at org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:388)
	at org.eclipse.jgit.internal.transport.sshd.JGitClientSession.messageReceived(JGitClientSession.java:199)
	at org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:64)
	at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:358)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:335)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:332)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)
	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
	at java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:158)
	at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:568)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
	at org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:429)
	at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:362)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:335)
	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:332)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)
	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
	at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:219)
	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)



And when I try via HTTPS, I get this:

eclipse.buildId=4.18.0.I20201202-1800
java.version=15.0.2
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring /Users/billbabcock/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/billbabcock/.eclipse_keyring

org.eclipse.egit.ui
Error
Wed Apr 14 00:53:57 EDT 2021
When trying to open a connection to https://github.REDACTED/REDACTED/REDACTED.git/info/lfs/objects/batch the server responded with an error code. rc=401

org.eclipse.jgit.api.errors.JGitInternalException: When trying to open a connection to https://github.REDACTED/REDACTED/REDACTED.git/info/lfs/objects/batch the server responded with an error code. rc=401
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:207)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:194)
	at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.executeCloneOperation(AbstractGitCloneWizard.java:488)
	at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.access$2(AbstractGitCloneWizard.java:481)
	at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard$6.run(AbstractGitCloneWizard.java:460)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: When trying to open a connection to https://github.REDACTED/REDACTED/REDACTED.git/info/lfs/objects/batch the server responded with an error code. rc=401
	at org.eclipse.jgit.lfs.SmudgeFilter.downloadLfsResource(SmudgeFilter.java:150)
	at org.eclipse.jgit.lfs.SmudgeFilter.<init>(SmudgeFilter.java:105)
	at org.eclipse.jgit.lfs.SmudgeFilter.<init>(SmudgeFilter.java:91)
	at org.eclipse.jgit.attributes.FilterCommandRegistry.createFilterCommand(FilterCommandRegistry.java:115)
	at org.eclipse.jgit.dircache.DirCacheCheckout.runBuiltinFilterCommand(DirCacheCheckout.java:1631)
	at org.eclipse.jgit.dircache.DirCacheCheckout.getContent(DirCacheCheckout.java:1574)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1487)
	at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:563)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:467)
	at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:377)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:204)
	... 5 more


All the auth tokens are fine and verified.

If I clone from the commandline I am able to switch branches, and pull fine it seems.

All thoughts and suggestions are welcome.
- bill
Re: Unable to clone repo in ssh or https in 5.12 [message #1840406 is a reply to message #1840404] Wed, 14 April 2021 15:38 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 374
Registered: August 2016
Senior Member
The first one (with SSH) is clearly a bug. Tracked now as bug 572849. I'll fix that right away.

The second one is something strange with LFS. Is that repo publicly accessible? (I suppose not...) Can you publish a small github repo with which that problem might be reproducible?

[Updated on: Wed, 14 April 2021 15:50]

Report message to a moderator

Re: Unable to clone repo in ssh or https in 5.12 [message #1840409 is a reply to message #1840406] Wed, 14 April 2021 17:12 Go to previous messageGo to next message
Bill Babcock is currently offline Bill BabcockFriend
Messages: 8
Registered: January 2021
Junior Member
Thanks for looking into it.
The ssh issue is the most important to me. I tried to reproduce the issue with a public repo I created of opensource C code (I stuck a large tarball in it hoping that might trigger it but it didn't) and didn't run into the problem.
So I will try some more things with the HTTPS clone via commandline and see if there's anything I can sort out, but w/o knowing more about what may be causing it I'm unable to shed more light on it.

The HTTPS clone got much further than the SSH one did, fwiw - it seems to fail around 90%.
Re: Unable to clone repo in ssh or https in 5.12 [message #1840413 is a reply to message #1840409] Wed, 14 April 2021 18:17 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 374
Registered: August 2016
Senior Member
Yes, I can see from the stack traces that the HTTPS clone got further. It failed after having received the upstream git repo data, but then hit a snag when checking out. The SSH problem is much earlier; it fails during the initial connection to the upstream.

The SSH problem should be fixed now. Try updating EGit/Jgit from the EGit nightly update site. (Don't forget to reload it in Eclipse first.)

I would appreciate feedback whether the fix really works. This problem didn't occur in my tests against github.com or other servers, and since I don't know what your github instance replies in the SSH protocol, I have no way to test the fix.

As for the LFS problem when cloning over HTTPS: I don't use LFS myself, so I may be a bit confused. But according to the LFS documentation, it seems there is auto-detection of the LFS URL only for SSH. It's not quite clear to me how one would clone a repository containing LFS-managed files over HTTPS. If you clone this repo with command-line git over https, does that put the real large files from the LFS server into your working tree? If it doesn't put the real LFS data into the working tree, what does it put there? Are there any lfs-related properties set in the git config, such as lfs.url or remote.origin.lfsurl?
Re: Unable to clone repo in ssh or https in 5.12 [message #1840414 is a reply to message #1840413] Wed, 14 April 2021 18:31 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 374
Registered: August 2016
Senior Member
Just noticed: JGit has bug 535814 about that HTTPS authentication problem with LFS. That seems to be your HTTPS LFS issue.
Re: Unable to clone repo in ssh or https in 5.12 [message #1840415 is a reply to message #1840414] Wed, 14 April 2021 19:38 Go to previous messageGo to next message
Bill Babcock is currently offline Bill BabcockFriend
Messages: 8
Registered: January 2021
Junior Member
Hi Thomas,
The fix did the trick - thanks a ton for the quick turnaround.
As far as LFS on commandline and HTTPS goes, it does work and I have used that frequently on VM machines I build and deploy from.
Re: Unable to clone repo in ssh or https in 5.12 [message #1840436 is a reply to message #1840415] Thu, 15 April 2021 08:37 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 374
Registered: August 2016
Senior Member
Thanks for the heads-up.

The HTTPS problem with LFS would need to be fixed by someone who actually uses LFS and has the means to test. I don't.
Previous Topic:Overriding Git config file without a file based config
Next Topic:Using JGit as a web service with multiple users using same repository
Goto Forum:
  


Current Time: Tue Jun 22 03:11:41 GMT 2021

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

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

Back to the top