Gitlab Cheatsheet

ยท 251 words ยท 2 minute read

gitlab ๐Ÿ”—

Ruby wrapper for the GitLab API.

Create a new project:

gitlab create_project project_name

Get info about a specific commit:

gitlab commit project_name commit_hash

Get info about jobs in a CI pipeline:

gitlab pipeline_jobs project_name pipeline_id

Start a specific CI job:

gitlab job_play project_name job_id

gitlab-runner ๐Ÿ”—

Manage GitLab runners.

Register a runner:

sudo gitlab-runner register --url <https://gitlab.example.com> --registration-token token --name name

Register a runner with a Docker executor:

sudo gitlab-runner register --url <https://gitlab.example.com> --registration-token token --name name --executor docker

Unregister a runner:

sudo gitlab-runner unregister --name name

Display the status of the runner service:

sudo gitlab-runner status

Restart the runner service:

sudo gitlab-runner restart

Check if the registered runners can connect to GitLab:

sudo gitlab-runner verify

gitlab-ctl ๐Ÿ”—

Manage the GitLab omnibus.

Display the status of every service:

sudo gitlab-ctl status

Display the status of a specific service:

sudo gitlab-ctl status nginx

Restart every service:

sudo gitlab-ctl restart

Restart a specific service:

sudo gitlab-ctl restart nginx

Display the logs of every service and keep reading until Ctrl + C is pressed:

sudo gitlab-ctl tail

Display the logs of a specific service:

sudo gitlab-ctl tail nginx

Official documentation & references ๐Ÿ”—

I hope this post helps you. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , Facebook , Telegram and GitHub .

Share: