Install GitLab Runner using the official GitLab repositories
Currently we support:
If you want to use the Docker executor, install it before using the Runner:
curl -sSL https://get.docker.com/ | sh
Add the repository
Add GitLab's official repository:
# For Debian/Ubuntu curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash # For RHEL/CentOS curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash
Note: Debian users should use APT pinning
Since Debian Stretch, Debian maintainers added their native package with the same name as is used by our package, and by default the official repositories will have a higher priority.
If you want to use our package you should manually set the source of the package. The best would be to add the pinning configuration file. Thanks to this every next update of the Runner's package - whether it will be done manually or automatically - will be done using the same source:
cat > /etc/apt/preferences.d/pin-gitlab-runner.pref <<EOF Explanation: Prefer GitLab provided packages over the Debian native ones Package: gitlab-ci-multi-runner Pin: origin packages.gitlab.com Pin-Priority: 1001 EOF
# For Debian/Ubuntu sudo apt-get install gitlab-ci-multi-runner # For RHEL/CentOS sudo yum install gitlab-ci-multi-runner
Register the Runner (look into Runners documentation to learn how to obtain a token):
sudo gitlab-ci-multi-runner register Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com ) https://gitlab.com Please enter the gitlab-ci token for this runner xxx Please enter the gitlab-ci description for this runner my-runner INFO fcf5c619 Registering runner... succeeded Please enter the executor: shell, docker, docker-ssh, ssh? docker Please enter the Docker image (eg. ruby:2.1): ruby:2.1 INFO Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
The Runner should be started already and you are ready to build your projects!
Make sure that you read the FAQ section which describes some of the most common problems with GitLab Runner.
Simply execute to install latest version:
# For Debian/Ubuntu sudo apt-get update sudo apt-get install gitlab-ci-multi-runner # For RHEL/CentOS sudo yum update sudo yum install gitlab-ci-multi-runner
Manually download packages
You can manually download the packages from the following URL: https://packages.gitlab.com/runner/gitlab-ci-multi-runner