Skip to main content
Gitaly is already included in your GitLab installation. However, if you need to install Gitaly separately for development or custom deployments, follow these instructions.

Prerequisites

Before installing Gitaly, ensure you have the required dependencies:
  • Go: Version 1.16 or 1.17
  • Ruby: Version 2.7
  • Git: Version 2.33.0 or newer
  • Make: For building from source

Installation Methods

Using Pre-built Binaries

Most users won’t install Gitaly on its own. It is already included in your GitLab installation.

Building from Source

To build and install Gitaly from source:
1

Clone the repository

Clone the Gitaly repository to your local machine:
git clone https://gitlab.com/gitlab-org/gitaly.git
cd gitaly
2

Build Gitaly

Run make to download and compile Ruby dependencies and compile the Gitaly Go executable:
make
This will:
  • Install Ruby dependencies
  • Compile all Gitaly executables
  • Place binaries in ./_build/bin directory
3

Install binaries

Install Gitaly binaries to the target directory:
make install
By default, binaries are installed to /usr/local/bin. You can customize the installation directory using the PREFIX and DESTDIR variables:
make install PREFIX=/opt/gitaly
4

Install bundled Git (optional)

Gitaly can use a bundled version of Git with specific patches:
make build-bundled-git
make install-bundled-git
The bundled Git version is v2.35.1.gl1 with GitLab-specific patches.

Build Options

Custom Build Configuration

You can customize the build process by creating a config.mak file in Gitaly’s root directory:
# Example config.mak
PREFIX = /usr/local
GIT_PREFIX = /usr/local/git
FIPS_MODE = 0

Build Variables

PREFIX
string
default:"/usr/local"
The prefix where Gitaly binaries will be installed. Binaries will end up in ${PREFIX}/bin.
GIT_PREFIX
string
default:"${GIT_DEFAULT_PREFIX}"
The prefix where Git will be installed when building bundled Git.
BUILD_TAGS
string
Build tags to include when compiling. For example, to enable Jaeger tracing:
make BUILD_TAGS="tracer_static tracer_static_jaeger"
FIPS_MODE
integer
default:"0"
Set to 1 to enable FIPS mode with BoringCrypto.

Build Targets

The Makefile provides several useful targets:
  • make build - Build Gitaly but do not install it
  • make install - Build and install Gitaly
  • make test - Execute both Go and Ruby tests
  • make clean - Remove all generated build artifacts
  • make help - Print help about available targets

Verification

After installation, verify that Gitaly is correctly installed:
gitaly --version
You should see output similar to:
Gitaly, version 14.x.x

Next Steps

Configuration

Configure Gitaly for your environment

Authentication

Set up authentication tokens

Build docs developers (and LLMs) love