The git client plugin provides git application programming interfaces (APIs) for Jenkins plugins. It can fetch, checkout, branch, list, merge, and tag repositories. Refer to the API documentation for specific API details.
The GitClient interface provides the primary entry points for git access. It supports username / password credentials and private key credentials using the Jenkins credentials plugin.
Changelog in GitHub Releases
Release notes are recorded in GitHub beginning with git client plugin 2.8.1. Prior release notes are recorded in the git client plugin repository change log.
The git client plugin default implementation requires that command line git is installed on the master and on every agent that will use git. Command line git implementations working with large files should also install git LFS. The command line git implementation is the canonical implementation of the git interfaces provided by the git client plugin.
Command line git is enabled by default when the git client plugin is installed.
The git client plugin also includes two optional implementations that use Eclipse JGit. Eclipse JGit is a pure Java implementation of git. The JGit implementation in the git client plugin provides most of the functionality of the command line git implementation. When the JGit implementation is incomplete, the gap is noted in console logs.
JGit is disabled by default when the git client plugin is installed.
Click the "Add Git" button in the "Global Tool Configuration" section under "Manage Jenkins" to add JGit or JGit with Apache HTTP Client as a git implementation.
The original JGit implementation inside the git client plugin had issues with active directory authentication. A workaround was implemented to provide JGit but use Apache HTTP client for authentication. The issue in JGit has now been resolved and delivered in git client plugin releases. JGit with Apache HTTP Client continues to delivered to assure compatibility.
Git for Windows is able to integrate with the Windows Credentials Manager for secure storage of credentials. Windows Credentials Manager works very well for interactive users on the Windows desktop. Windows Credentials Manager does not work as well for batch processing in the git client plugin. It is best to disable Windows Credentials Manager when installing Git on Jenkins agents running Windows.
Report issues and enhancements with the Jenkins issue tracker.
Refer to contributing to the plugin for contribution guidelines.