Quick Start Guide
This guide will help you get Gitaly up and running for development or testing purposes.Most users won’t install Gitaly separately - it’s already included in your GitLab installation.
Prerequisites
System Requirements
- Go: Version 1.16 or 1.17
- Ruby: Version 2.7
- Git: Version 2.33.0 or newer
- Make: For building the project
Optional Requirements
- PostgreSQL: 9.6+ (required for Praefect high availability)
- Docker: For running test databases
Installation
Clone the Repository
If you’re working with the GitLab Development Kit (GDK), Gitaly is already cloned at
/path/to/gdk/gitaly.For standalone installation:Build Gitaly
Run This installs Gitaly into the
make to download and compile Ruby dependencies, and compile the Gitaly Go executable:./_build/bin directory.To build with distributed tracing support:
make BUILD_TAGS="tracer_static tracer_static_jaeger"Configuration
Basic Configuration
Edit yourconfig.toml file with the minimum required settings:
Advanced Configuration Options
Authentication
Enable token-based authentication:Network Listeners
Configure TCP and TLS listeners:Prometheus Metrics
Export metrics for monitoring:Git Configuration
Customize Git binary location and settings:Logging
Configure logging output:Gitaly-Ruby Configuration
Concurrency Control
Limit concurrent operations per RPC:Rate Limiting
Control request rates:Daily Maintenance
Schedule optimization tasks:Multiple Storages
Configure multiple storage locations:Running Gitaly
Start Gitaly
Run Gitaly with your configuration file:With Distributed Tracing
If compiled with tracing support:In GitLab Development Kit
If using GDK, restart Gitaly after making changes:To prevent GDK from overwriting your Gitaly checkout, add to
/path/to/gdk/gdk.yml:Testing Your Installation
Verify Gitaly is Running
Check that Gitaly is listening on the configured socket:Check Logs
Monitor Gitaly logs for errors:Test with GitLab
If integrated with GitLab, test Git operations:Development Workflow
Building and Testing
Run Tests
For Praefect tests, start a PostgreSQL database:Run the full test suite:Run specific tests:
Makefile Targets
Common make targets:make build- Build Gitaly without installingmake install- Build and install Gitaly (modifyPREFIXto change destination)make test- Execute both Go and Ruby testsmake proto- Generate server and client code from protocol definitionsmake clean- Remove all generated build artifacts
Configuration Persistence
Create aconfig.mak file next to the Makefile to persist build variables:
Next Steps
Architecture
Learn about Gitaly’s design and architecture decisions
Configuration Reference
Explore all configuration options in detail
High Availability
Set up Praefect for HA and replication
Contributing
Learn how to contribute to Gitaly development
Troubleshooting
Common Issues
Gitaly fails to start- Check that the socket directory exists and is writable
- Verify Git binary is in the configured
bin_path - Check logs for specific error messages
- Verify Gitaly is running:
ps aux | grep gitaly - Check the socket path matches GitLab’s configuration
- Ensure file permissions allow GitLab to access the socket
- Review
gitaly-rubyworker count and memory limits - Check for memory-intensive operations in logs
- Consider adjusting
max_rssand restart thresholds