Community
Participate
Working Groups
I tried to replace the original jsch with an updated variant, but that caused an NPE. CloneCommand cloneCommand = Git.cloneRepository() .setURI("git@github.com:mwiede/jsch.git") .setDirectory(new File("target/junit/clone-test)); assertDoesNotThrow(cloneCommand::call).close(); // <-- Error This is caused by the following line: https://gerrit.googlesource.com/jgit/+/refs/tags/v5.13.0.202109080827-r/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java#401 JSch.setConfig("ssh-rsa", JSch.getConfig("signature.rsa")); JSch.setConfig("ssh-dss", JSch.getConfig("signature.dss")); These properties are already renamed in that fork, so the old properties are no longer present. IMO jgit should only set the properties if they aren't already set. (As they may already be set to a custom value). "Original" JSch: https://github.com/is/jsch/blob/master/src/main/java/com/jcraft/jsch/JSch.java Forked JSch: https://github.com/mwiede/jsch Related issue in the forked libary: https://github.com/mwiede/jsch/issues/85 The issue can be worked around using the following code, prior to invoking jgit: JSch.setConfig("signature.rsa", JSch.getConfig("ssh-rsa")); My preferred solution would be setting the property, only if it isn't already set: if (JSch.getConfig("ssh-rsa") == null) { JSch.setConfig("ssh-rsa", JSch.getConfig("signature.rsa")); } if (JSch.getConfig("ssh-dss") == null) { JSch.setConfig("ssh-dss", JSch.getConfig("signature.dss")); } As proposed here: https://github.com/mwiede/jsch/issues/85#issuecomment-940985400
JSch support is deprecated and is dropped completely in JGit 6.0.
Let's fix this. I suppose we can drop JSch only once we have agent support for o.e.j.ssh.apache.
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/186638
Looks good to me.
Gerrit change https://git.eclipse.org/r/c/jgit/jgit/+/186638 was merged to [master]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=f8b0c00e6a8f5628babff6dd37254a21589b6e44
Do you have any plan to port it to stable-5.13, and other stable branches such as stable-5.9, stable-5.10, stable-5.11, stable-5.12?
(In reply to Hiroshi Miura from comment #6) > Do you have any plan to port it to stable-5.13, and other stable branches > such as stable-5.9, stable-5.10, stable-5.11, stable-5.12? We could do 5.13, but we won't backport to any earlier branches.
Gerrit change https://git.eclipse.org/r/c/jgit/jgit/+/188030 was merged to [stable-5.13]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=6fe66b738250adf8c830df824a43c69c4a1d0e45