Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

JGit/New and Noteworthy/5.8

JGit

New Bundles

The core bundle org.eclipse.jgit has been refactored to move some dependencies into optional extra bundles:

  • Support for SSH connections via the old JSch implementation has been moved to new bundle org.eclipse.jgit.ssh.jsch. This bundle is an OSGi fragment.
  • Support for GPG-signing commits via Bouncy Castle has been moved to new bundle org.eclipse.jgit.gpg.bc. This bundle is an OSGi fragment.

SSH

For SSH, this means an application using JGit can now include only exactly what it needs:

  • include org.eclipse.jgit.ssh.jsch in the application if it wants to use JSch for SSH connections. If this bundle is present, it will provide the default SshConnectionFactory.
  • include org.eclipse.jgit.ssh.apache in the application if it wants to use Apache MINA sshd for SSH connections. In an OSGi application set the SshConnectionFactory explicitly to a org.eclipse.jgit.ssh.apache.SshdConnectionFactory in this case.


As before, it's also possible to use an external SSH application by setting the environment variable GIT_SSH to contain the path to an SSH executable. If neither bundle is included in the application that's the only built-in support for git SSH connections.

It is also possible to include both bundles and use one or the other for different SSH connections.

GPG

For GPG signing of Commits, an application not using this feature no longer needs to contain the fairly large Bouncy Castle libraries. If the application does use this feature, then it needs to include bundle org.eclipse.jgit.gpg.bc and the Bouncy Castle libraries, or provide its own implementation of org.eclipse.jgit.lib.GpgSigner. If bundle org.eclipse.jgit.gpg.bc is present, the implementation from this bundle will be taken as default for the org.eclipse.jgit.lib.GpgSigner.

GPG signing is used if:

  • the application calls org.eclipse.jgit.api.CommitCommand.setSigning(true), or
  • the user has configured git config commit.gpgSign = true.


If GPG-signing a commit is requested but no GpgSigner is installed, an org.eclipse.jgit.api.errors.ServiceUnavailableException will be thrown.

Dependencies

  • Bundle org.eclipse.jgit has no dependency on JSch (com.jcraft.jsch) anymore.
  • Bundle org.eclipse.jgit has no dependency on Bouncy Castle (org.bouncycastle.*) anymore.
  • Bundle org.eclipse.jgit.ssh.apache newly requires Apache MINA sshd 2.4.0 (previously 2.2.0). As always, this bundle may not work with newer versions of Apache MINA sshd because of incompatible upstream API changes.
  • Bundle org.eclipse.jgit.ssh.jsch depends on JSch (com.jcraft.jsch). Minimum required version is 0.1.37, but if you have to use this at all, use the latest version 0.1.55. (Versions unchanged from JGit 5.7.0.)
  • Bundle org.eclipse.jgit.gpg.bc newly requires at least Bouncy Castle 1.65. (Previously JGit required at least 1.61.)

Other Changes

The complete list of new features and bug fixes is available in the release notes.

Contributors

The following 18 developers worked on this release:

Alex Spradlin, Alexander Nittka, David Ostrovsky, David Pursehouse, Demetr Starshov, Ivan Frade, Jack Wickham, Karsten Thoms, Konrad Windszus, Lars Vogel, Masaya Suzuki, Matthias Sohn, Michael Keppler, Minh Thai, Nail Samatov, Pat Long, Thomas Wolf, Yunjie Li

Back to the top