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.
Difference between revisions of "JGit/New and Noteworthy/5.8"
m (→JGit) |
(Describe things based on the assumption that both the Bouncy Castle and the JSch refactoring go into 5.8.0.) |
||
Line 1: | Line 1: | ||
= JGit = | = JGit = | ||
− | == | + | == New Bundles == |
− | * Bundle <code>org.eclipse.jgit.ssh.apache</code> newly requires [https://mina.apache.org/sshd-project/ Apache MINA sshd] 2.4.0 (previously 2.2.0). | + | The core bundle <code>org.eclipse.jgit</code> has been refactored to move some dependencies into optional extra bundles: |
− | * JGit 5. | + | * Support for SSH connections via the old <tt>JSch</tt> implementation has been moved to new bundle <code>org.eclipse.jgit.ssh.jsch</code>. This bundle is an OSGi fragment. |
+ | * Support for GPG-signing commits via [https://www.bouncycastle.org Bouncy Castle] has been moved to new bundle <code>org.eclipse.jgit.gpg.bc</code>. This bundle is an OSGi fragment. | ||
+ | |||
+ | === SSH === | ||
+ | For '''SSH''', this means an application using JGit can now include only exactly what it needs: | ||
+ | * include <code>org.eclipse.jgit.ssh.jsch</code> in the application if it wants to use <code>JSch</code> for SSH connections. If this bundle is present, it will provide the default <tt>SshConnectionFactory</tt>. | ||
+ | * include <code>org.eclipse.jgit.ssh.apache</code> in the application if it wants to use [https://mina.apache.org/sshd-project/ Apache MINA sshd] for SSH connections. In an OSGi application set the <tt>SshConnectionFactory</tt> explicitly to a <code>org.eclipse.jgit.ssh.apache.SshdConnectionFactory</code> in this case. | ||
+ | |||
+ | |||
+ | As before, it's also possible to use an external SSH application by setting the environment variable <code>GIT_SSH</code> 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 <code>org.eclipse.jgit.gpg.bc</code> and the Bouncy Castle libraries, or provide its own implementation of <tt>org.eclipse.jgit.lib.GpgSigner</tt>. If bundle <code>org.eclipse.jgit.gpg.bc</code> is present, the implementation from this bundle will be taken as default for the <tt>org.eclipse.jgit.lib.GpgSigner</tt>. | ||
+ | |||
+ | GPG signing is used if: | ||
+ | * the application calls <tt>org.eclipse.jgit.api.CommitCommand.setSigning(true)</tt>, or | ||
+ | * the user has configured [https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitgpgSign git config] <tt>commit.gpgSign = true</tt>. | ||
+ | |||
+ | |||
+ | If GPG-signing a commit is requested but no <tt>GpgSigner</tt> is installed, an <code>org.eclipse.jgit.api.errors.ServiceUnavailableException</code> will be thrown. | ||
+ | |||
+ | == Dependencies == | ||
+ | |||
+ | * Bundle <code>org.eclipse.jgit</code> has no dependency on JSch (<tt>com.jcraft.jsch</tt>) anymore. | ||
+ | * Bundle <code>org.eclipse.jgit</code> has no dependency on Bouncy Castle (<tt>org.bouncycastle.*</tt>) anymore. | ||
+ | |||
+ | * Bundle <code>org.eclipse.jgit.ssh.apache</code> newly requires [https://mina.apache.org/sshd-project/ 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 <code>org.eclipse.jgit.ssh.jsch</code> depends on <tt>JSch</tt> (<tt>com.jcraft.jsch</tt>). 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 <code>org.eclipse.jgit.gpg.bc</code> newly requires [https://www.bouncycastle.org Bouncy Castle] '''1.65'''. (Previously 1.61.) | ||
== Other Changes == | == Other Changes == |
Revision as of 15:59, 31 May 2020
Contents
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 useJSch
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 aorg.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 Bouncy Castle 1.65. (Previously 1.61.)
Other Changes
The complete list of new features and bug fixes is available in the release notes.
Contributors
The following X developers worked on this release:
<TBD: list of contributors, number>