Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » egit "connection refused", but msys/git works
egit "connection refused", but msys/git works [message #1771654] Tue, 29 August 2017 07:35 Go to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
I have a local repository with remote
origin=ssh://git@bitbucket.nets.no:29481/~vgheo/one-pa-vlad.git

The public key is properly installed on the server.
Both msys/git and egit have access to the same ssh key pair.


msys/git : git fetch origin
- works as expected

egit: fetch origin
- results in the following error
!SUBENTRY 1 org.eclipse.egit.ui 4 0 2017-08-29 10:27:25.863
!MESSAGE ssh://git@bitbucket.nets.no:29481/~vgheo/one-pa-vlad.git: Connection refused: connect
!STACK 0
org.eclipse.jgit.api.errors.TransportException: ssh://git@bitbucket.nets.no:29481/~vgheo/one-pa-vlad.git: Connection refused: connect
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:245)
at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:132)
at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:108)
at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.performJob(FetchOperationUI.java:134)
at org.eclipse.egit.ui.internal.jobs.RepositoryJob.run(RepositoryJob.java:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git@bitbucket.nets.no:29481/~vgheo/one-pa-vlad.git: Connection refused: connect
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:274)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:169)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1236)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:234)
... 5 more


Any hints would be greatly appreciated.

Best regards
Vlad


Re: egit "connection refused", but msys/git works [message #1771695 is a reply to message #1771654] Tue, 29 August 2017 14:49 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Hard to say with that stack trace. A pity JGit does not attach the original exception from Jsch. (Jsch is the ssh library used by JGit.)

What format is your key? Jsch can deal only with openssh-formatted keys, keys in putty format won't work. A putty key can be converted to openssh format via puttygen.

Or the Jsch implementation cannot talk with the bitbucket server due to unsupported encryption schemes, for instance ed25519, being used.

Or maybe you're running afoul of bug 398085.
Re: egit "connection refused", but msys/git works [message #1771905 is a reply to message #1771695] Thu, 31 August 2017 21:43 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Ok. Could you please update EGit and JGit to the latest nightly builds available at the official update site and then re-try? I don't expect it to work, but at least we should get a more complete stack trace. Maybe that would give a clue as to what's up.
Re: egit "connection refused", but msys/git works [message #1772046 is a reply to message #1771905] Mon, 04 September 2017 15:48 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
BTW, is 29481 the correct port number? How about trying 29418 instead?
Previous Topic:EGit : Windows + LFS + ssh
Next Topic:Resolve conflicts with egit: Files marked as untracked in the Unestaged Changes
Goto Forum:
  


Current Time: Wed Apr 24 17:27:54 GMT 2024

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

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

Back to the top