7 Steps for GitLab Runner Registration

In this article, We are going to perform 7 Steps for GitLab Runner Registration.

What is GitLab Runner

GitLab Runner is the most used open source project which is used to run CI/CD  jobs and send the results back to GitLab Server. It is used to do CI/CD of jobs and supports Linux, Windows , Mac and other operating systems.

Steps for GitLab Runner Registration

1. First login to GitLab Server with Username and Password.

login to gitlab server with username and password

2. Click on your project and select Settings

goto gitlab project settings

3. Navigate to Settings and click on CI/CD inside this click on Expand of Runners section

goto gitlab CICD and expand

4. Copy GitLab server URL and Registration Token as shown below.

copy the gitlab server url and token

5. Paste GitLab Server URL and Token in registration command as below

$ gitlab-runner register --name project-name-runner --url https://gitlab.fosstechnix.com --registration-token  Uc7yzxTMzsXhXJx3zgM

6. Copy above command. Login to GitLab runner server through SSH and paste & run copied command on command line.

Follow the default options until which agent you need to register and then select agent as shown below

register gitlab runner using ssh

7. Once you registered Runner for project then you will get runner as below,

gitlab runner activated

Successfully, We have performed GitLab Runner Registration.

Error: This job is stuck because the project doesn’t have any runners online assigned to it. Go to Runners page

Solution:

You have added tags while registering GitLab Runner however you have not added tags for your Job.

Follow below steps to add tags.

1. Navigate to Settings and click on CI/CD inside this click on Expand of Runners section

2. Go to Runners and check on Indicates whether this runner can pick jobs without tags Box

Indicates whether this runner can pick jobs without tags

Conclusion

In this article, We have covered GitLab Runner registration and activated GitLab Runner.

Related Articles

How to Install GitLab on Ubuntu 18.04/16.04 LTS

Angular CI CD Pipeline with GitLab in 6 Easy Steps

Reference

GitLab Official Documentation

Mahesh Karale

I am Mahesh Karale working as DevOps Engineer. Likes to Explore and Research on Linux, Cloud and DevOps Tools.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap