Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Remote hung up unexpectedly on clone repository
Remote hung up unexpectedly on clone repository [message #1852598] Thu, 26 May 2022 10:19 Go to next message
Andrew Kaplanov is currently offline Andrew KaplanovFriend
Messages: 5
Registered: May 2022
Junior Member
I have clone problem of SSH repositories with newest JGit versions 6.1.0.202203080745-r and 5.13.0.202109080827-r.

Git.cloneRepository().setURI("ssh://...").call() always throws exception org.eclipse.jgit.api.errors.TransportException: ssh://...: remote hung up unexpectedly

JGit version 5.6.1.202002131546-r clones same repository without problems.

Command line "git clone ssh://..." with same repository completed successfully.

What is wrong?
Re: Remote hung up unexpectedly on clone repository [message #1852614 is a reply to message #1852598] Fri, 27 May 2022 09:57 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Impossible to say. Not enough information.

Possible duplicate of https://www.eclipse.org/forums/index.php?t=msg&th=1109789 . What kind of server is this cloning from?

Try adding setTagOption(TagOpt.FETCH_TAGS).
Re: Remote hung up unexpectedly on clone repository [message #1852616 is a reply to message #1852614] Fri, 27 May 2022 12:10 Go to previous messageGo to next message
Andrew Kaplanov is currently offline Andrew KaplanovFriend
Messages: 5
Registered: May 2022
Junior Member
>What kind of server is this cloning from?

bitbucket.org

ssh://git@bitbucket.org/...

>Try adding setTagOption(TagOpt.FETCH_TAGS).

result is same
Re: Remote hung up unexpectedly on clone repository [message #1852617 is a reply to message #1852616] Fri, 27 May 2022 12:18 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
I suspected it might be Bitbucket Cloud. They have configured their SSH in a somewhat non-standard, restricted way. They only allow a single SSH channel to be opened in an SSH session. JGit sometimes uses two SSH channels sequentially.

The problem does not occur with command-line git because that delegates all SSH work to the external SSH executable, and thus creates two successive SSH sessions for that case.
Re: Remote hung up unexpectedly on clone repository [message #1852622 is a reply to message #1852617] Fri, 27 May 2022 14:33 Go to previous messageGo to next message
Andrew Kaplanov is currently offline Andrew KaplanovFriend
Messages: 5
Registered: May 2022
Junior Member
But the old version of JGit works well with BitBucket.
Can you make the new one work too?
Re: Remote hung up unexpectedly on clone repository [message #1852627 is a reply to message #1852622] Fri, 27 May 2022 20:37 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Hmmm... there was another problem with bitbucket if JGit used JSch for SSH caused by a bug in JSch. If you're using JSch, switch to using the Apache MINA sshd integration.
Re: Remote hung up unexpectedly on clone repository [message #1852635 is a reply to message #1852627] Sat, 28 May 2022 18:38 Go to previous messageGo to next message
Andrew Kaplanov is currently offline Andrew KaplanovFriend
Messages: 5
Registered: May 2022
Junior Member
Thank you.
As I understand, I must to call SshSessionFactory.setInstance() with alternative SshSessionFactory.
Where can I find sample of create SshSessionFactory for Apache MINE sshd?
Re: Remote hung up unexpectedly on clone repository [message #1852641 is a reply to message #1852635] Sun, 29 May 2022 12:33 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
A very simple setup is in org.eclipse.jgit.pgm.TextBuiltIn.execute(). Other setups are shown in the org.eclipse.jgit.ssh.apache.test bundle. If you need to configure your factory in special ways, there is a SshdSessionFactoryBuilder that makes this somewhat easier.
Re: Remote hung up unexpectedly on clone repository [message #1852647 is a reply to message #1852641] Sun, 29 May 2022 19:02 Go to previous messageGo to next message
Andrew Kaplanov is currently offline Andrew KaplanovFriend
Messages: 5
Registered: May 2022
Junior Member
Thank you.
Clone bitbucket repository with Apache MINE sshd terminated successfully with some strange console messages.

getOrCreateProvider(BC) created instance of org.bouncycastle.jce.provider.BouncyCastleProvider
getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory
handleUnknownRequest(ClientConnectionService[JGitClientSession[git@bitbucket.org/104.192.141.1:22]]) unknown global request: keepalive@conker
handleUnknownRequest(ClientConnectionService[JGitClientSession[git@bitbucket.org/104.192.141.1:22]]) unknown global request: keepalive@conker
handleUnknownRequest(ClientConnectionService[JGitClientSession[git@bitbucket.org/104.192.141.1:22]]) unknown global request: keepalive@conker
handleUnknownRequest(ClientConnectionService[JGitClientSession[git@bitbucket.org/104.192.141.1:22]]) unknown global request: keepalive@conker
Re: Remote hung up unexpectedly on clone repository [message #1852661 is a reply to message #1852647] Mon, 30 May 2022 14:29 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
The first three messages are prefectly fine, just telling you what Apache MINA sshd uses as defaults.

The four handleUnknownRequets messages are probably https://issues.apache.org/jira/browse/SSHD-1237 . In any case they're harmless.
Previous Topic:Egit showing all .class file in unstaged changes after building workspace
Next Topic:Feature Wish: more descriptive Information instead of "Ours"/"Theirs"
Goto Forum:
  


Current Time: Thu Mar 28 22:19:19 GMT 2024

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

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

Back to the top