git_client

May 7, 2026 ยท View on GitHub

The git_client resource manages the installation of a Git client on a machine.

Note: on macOS systems homebrew must first be installed on the system before running this resource. Prior to version 9.0 of this cookbook homebrew was automatically installed.

Actions

ActionDescription
:installInstalls Git from the platform package provider or Git for Windows installer. Default.
:install_from_sourceBuilds and installs Git from source on supported Linux platforms.
:removeRemoves the package or Windows package and Windows PATH entry.

Properties

PropertyTypeDefaultDescription
package_nameStringplatform defaultPackage name for package installs.
package_versionStringnilPackage version for package installs.
package_actionSymbol:installAction passed to the package resource during :install.
source_checksumStringGit 2.54.0 tarball checksumSource tarball checksum.
source_prefixString'/usr/local'Prefix used by make install.
source_urlStringkernel.org source tarball URL for source_versionSource tarball URL.
source_use_pcretrue, falsefalseBuild Git with PCRE support.
source_versionString'2.54.0'Git source version to build.
windows_architectureStringdetected from kernel machineWindows installer architecture: 32, 64, or arm64.
windows_display_nameString"Git version <version>"Display name used by windows_package.
windows_package_urlStringGit for Windows release URLInstaller URL.
windows_package_checksumStringnilOptional installer checksum.
windows_package_versionString'2.54.0'Git for Windows version.

Examples

Package install

git_client 'default'

Source install

git_client 'source' do
  source_version '2.54.0'
  action :install_from_source
end

Windows install

git_client 'default' do
  windows_package_version '2.54.0'
  windows_architecture '64'
end