Closed StrangeNoises closed 3 years ago
Thanks for reporting!
Indeed, the issue was caused by the recent migration from grgit to jgit (because grgit is hosted with recently shut down jcenter
).
First of all, it turns out Jgit moved SSH support into separate libs as of version 5.8, so it have to be explicitly included, exactly as you pointed out. But just including the correct lib didn't work as Jgit still cannot find the correct SshSessionFactory
(seems like Java ServiceLoader
does not work well with Gradle plugins). Luckily it can be set manually.
But it turned out that org.eclipse.jgit.ssh.jsch
does not work well, somehow I got vague "Auth fail" errors even though the old version based on grgit worked just fine. I ended up copying grgit hack that manually checks for ssh
in PATH
and sets GIT_SSH
variable for Jgit to use system command instead of own broken implementation.
Long story short - it should be fixed in v2.0.4 now.
I get this on my first attempt to get this plugin going, against an in-house git server accessed via ssh.
"remote hung up unexpectedly"
With stacktrace:
The SshTransportFactory isn't getting initialised. I think this is because the jgit ssh implementation library is not in the classpath, because it's not declared in the dependencies. I think it probably needs
in your build.gradle. I'm afraid my gradle-fu doesn't seem to be up to forcibly injecting it, and its transitive dependencies on jsch etc., into the classpath for gradle at the initialization stage (when settings.gradle is read) or I'd have tested that as a workaround...