GitLab Development Kit (GDK) provides a local environment for developing GitLab and related projects.
Installation requires Git and make
are installed.
git
and make
are installed by default.
-
Update the list of available packages:
sudo apt update
-
Add an
apt
repository for the latest version of Git.-
For Ubuntu, install
add-apt-repository
and add a PPA repository:sudo apt install software-properties-common sudo add-apt-repository ppa:git-core/ppa
-
For Debian, add a backport repository for your Debian version.
-
-
Install Git and Make:
sudo apt install git make
Update the list of available packages and install Git and Make:
sudo pacman -Syu git make
Install using your system's package manager.
The one-line installation:
- Clones the GDK project into a new
gitlab-development-kit
directory in the current working directory. - Installs
asdf
and necessaryasdf
plugins. - Runs
gdk install
. - Runs
gdk start
.
-
Install GDK:
curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash
After prerequisites are installed, you can install GDK dependencies and GDK itself.
Before installing GDK, your local environment must have third-party software
installed and configured. These can be installed and managed automatically
using asdf
or manually.
If you've previously managed your own dependencies, you can
migrate to asdf
to allow GDK to manage dependencies for you.
Installing and managing dependencies automatically lets GDK manage dependencies for you using
asdf
:
-
Clone the
gitlab-development-kit
repository into your preferred location, if you haven't previously:git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
-
Change into the GDK project directory:
cd gitlab-development-kit
-
Install all dependencies using
asdf
:make bootstrap
-
If migrating from other version managers like RVM or rbenv, you can set
legacy_version_file
in.asdfrc
to load the Ruby version from a different config file like.ruby-version
.
Use your operating system's package manager to install and managed dependencies. Advanced instructions are available to help. These include instructions for macOS, Ubuntu, and Debian (and other Linux distributions), FreeBSD, and Windows 10. You should regularly update these. Generally, the latest versions of these dependencies work fine. Install, configure, and update all of these dependencies as a non-root user. If you don't know what a root user is, you very likely run everything as a non-root user already.
After installing GDK dependencies:
-
Install the
gitlab-development-kit
gem:gem install gitlab-development-kit
-
Clone the
gitlab-development-kit
repository into your preferred location:git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
The default directory created is
gitlab-development-kit
. This can be customized by appending a different directory name to thegit clone
command. -
Change into the GDK project directory:
cd gitlab-development-kit
-
Install all the Ruby dependencies:
bundle install
Install GDK by cloning and configuring GitLab and other projects using
gdk install
. Use one of the following methods:
-
For those who have write access to the GitLab.org group, we recommend installing using SSH:
gdk install [email protected]:gitlab-org/gitlab.git
-
Otherwise, install using HTTPs:
gdk install
Use gdk install shallow_clone=true
for a faster clone that consumes less disk-space. The clone
process uses git clone --depth=1
.
If you want to run GitLab FOSS, install GDK using the GitLab FOSS project.
If you want to run GitLab from your own fork, install GDK using your own GitLab fork.
We recommend setting up gdk.test
as a local hostname. For more information, see
Local network binding.
During the gdk install
process, you may encounter some dependency-related
errors. If these errors occur:
- Run
gdk doctor
, which can detect problems and offer possible solutions. - Refer to the troubleshooting page.
- Open an issue in the GDK tracker.
- Run
gdk pristine
to restore your GDK to a pristine state.
Instructions to generate a developer license can be found in the onboarding documentation.
For information about adding your license to GitLab, see Activate GitLab EE with a license
After successful installation, see:
After installation, learn how to use GDK to enable other features.
For information about updating GDK, see Update GDK.
After you have set up GDK initially, you can create new fresh installations. You might do this if you have problems with existing installation that are complicated to fix. You can get up and running quickly again by:
- In the parent folder for GDK, run
git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
. - In the new directory, run
gdk install
.