1. Information

2. GitLab Registration

  • Browse to https://about.gitlab.com/pricing.

  • Select Free | Get started.

  • Click Register now.

    First name      Douwe                           Douwe
    Last name       Kiestra                         Kiestra
    Username        delta-software-labs             dhkiestra
    Email           douwe@deltasoftware.frl         dhkiestra@protonmail.com
    Password        ********                        ********
    ■ I agree that GitLab can contact me by email about its product, services, or events.
  • Click Continue.

  • Enter the code received by email in the Verification code field.

  • Click Verify email address.

  • Select DevOps Engineer for Role.

  • Select I want to explore GitLab to see if it’s worth switching to for I’m signing up for GitLab because.

  • Choose Create a new project for What would you like to do?.

  • Choose Just me for Who will be using GitLab?.

  • Click Continue.

  • Select the Create tab.

    Group name              delta-software-labs-group
    Project name            delta-software-labs-project
    Select a template       Select
    
    Your project will be created at:
    https://gitlab.com/delta-software-labs-group/delta-software-labs-project
    You can always change your URL later
    
    ■ Include a Getting Started README
  • Click Create project.

3. Create Repository

  • Sign in to GitLab.

  • Select the Projects page.

  • Select the delta-software-labs-group / delta-software-labs-project project.

  • Select Learn GitLab.

  • Click Create a repository.

    cd ~/GitLabExercise
    git init
    git add README.md
    git status -s
    git commit -m "First commit"
    git status -s
    git hg-log
    git push -u https://gitlab.com/dhkiestra/gitlabexercise.git master

4. Add SSH Key

  • Sign in to GitLab.

  • Select the Projects page.

  • Select a project.

  • Click Add SSH key.

  • Click Add new key.

  • Copy the contents of the ~/.ssh/id_ed25519.pub file to the Key field.

    Title                   delta@HOMENB-FRL01
    Usage type              Authentication & Signing
    Expiration date         2027-01-09
  • Click Add key.

    ls -al ~/.ssh/id_ed25519*
    -rw------- 1 delta delta 411 2025-10-16 08:10:43 /home/delta/.ssh/id_ed25519
    -rw------- 1 delta delta 411 2026-01-11 15:05:07 /home/delta/.ssh/id_ed25519-douwe
    -rw-r--r-- 1 delta delta 100 2026-01-11 15:05:28 /home/delta/.ssh/id_ed25519-douwe.pub
    -rw-r--r-- 1 delta delta  99 2025-10-16 08:10:43 /home/delta/.ssh/id_ed25519.pub
    
    ssh -T git@gitlab.com                                   # Welcome to GitLab, @delta-software-labs!
    ssh -i ~/.ssh/id_ed25519-douwe -T git@gitlab.com        # Welcome to GitLab, @dhkiestra!

5. Personal Access Token

  • Sign in to GitLab.

  • Select Avatar (User icon) > Edit profile.

  • Select the Personal access tokens page.

  • Select Add new token.

  • Type GITLAB_ACCESS_TOKEN in the Token name field.

  • Set the Expiration date to one year later.

  • Check read_registry.

  • Check read_api.

  • Click Create token.

  • Copy and paste the value in KeePassXC password manager.

  • Select Settings > CI/CD.

  • Expand Variables.

  • Click Add variable.

  • Type GITLAB_ACCESS_TOKEN in the Key field.

  • Paste the value in the Value field.

  • Click Add variable.

  • Click Cancel.

6. Project Access Token

  • Sign in to GitLab.

  • Select the Projects page.

  • Select a project.

  • Select Settings > Access tokens.

  • Select Add new token.

  • Type PROJECT_ACCESS_TOKEN in the Token name field.

  • Set the Expiration date to one year later.

  • Check read_repository.

  • Check write_repository.

  • Click Create project access token.

  • Copy and paste the value in KeePassXC password manager.

  • Select Settings > CI/CD.

  • Expand Variables.

  • Click Add variable.

  • Type PROJECT_ACCESS_TOKEN in the Key field.

  • Paste the value in the Value field.

  • Click Add variable.

  • Click Cancel.

7. GitLab Deploy Token

  • Sign in to GitLab.

  • Select the Projects page.

  • Select a project.

  • Select Settings > Repository.

  • Expand Deploy tokens.

  • Click Add token.

  • Type GITLAB_DEPLOY_TOKEN in the Name field.

  • Check read_package_registry.

  • Check write_package_registry.

  • Click Create deploy token.

  • Click Cancel.

  • Copy and paste the value in KeePassXC password manager.

  • Select Settings > CI/CD.

  • Expand Variables.

  • Click Add variable.

  • Type GITLAB_DEPLOY_TOKEN in the Key field.

  • Paste the value in the Value field.

  • Click Add variable.

  • Click Cancel.

8. NPM Registry

curl --header "PRIVATE-TOKEN: <personal-access-token>" --url "https://gitlab.com/api/v4/projects/77592356/packages"

9. Add Runner

  • Sign in to GitLab.

  • Select the Projects page.

  • Select a project.

  • Select Settings > CI/CD.

  • Expand Runners.

  • Click Create project runner.

  • Type linux in the Tags field.

  • Click Create runner.

  • Copy the runner authentication token.

10. Install Runner On VPS

# Log in.
ssh team@vps-web.deltasoftware.frl

# Prepare VPS.
sudo apt-get update
sudo apt-get upgrade --yes
sudo apt install --yes curl gnupg apt-transport-https ca-certificates

# Add GitLab repository.
curl -fsSL https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
ls -al /etc/apt/sources.list.d
cat /etc/apt/sources.list.d/runner_gitlab-runner.list

# Install GitLab runner.
sudo apt-get update
sudo apt-get install gitlab-runner --yes

# Register the runner.
sudo gitlab-runner register --url https://gitlab.com --token <runner-authentication-token>

# Runtime platform                                    arch=amd64 os=linux pid=695340 revision=1c855082 version=18.7.2
# Running in system-mode.
#
# Enter the GitLab instance URL (for example, https://gitlab.com/):
# [https://gitlab.com]:
# Verifying runner... is valid                        correlation_id=9bbbce6ce2f3671e-IAD runner=68z10wfSc
# Enter a name for the runner. This is stored only in the local config.toml file:
# [vps-web.deltasoftware.frl]:
# Enter an executor: shell, parallels, virtualbox, docker-windows, kubernetes, docker-autoscaler, instance, custom, ssh, docker, docker+machine:
# shell
# Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
#
# Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml"

sudo cat /etc/gitlab-runner/config.toml

# Verify that the runner is available to pick up jobs.
sudo gitlab-runner run

# Runtime platform                                    arch=amd64 os=linux pid=695476 revision=1c855082 version=18.7.2
# Starting multi-runner from /etc/gitlab-runner/config.toml...  builds=0 max_builds=0
# Running in system-mode.
#
# Usage logger disabled                               builds=0 max_builds=1
# Configuration loaded                                builds=0 max_builds=1
# WARNING: CONFIGURATION: Long polling issues detected.
# Issues found:
#   - Request bottleneck: 1 runners have request_concurrency=1, causing job delays during long polling
# This can cause job delays matching your GitLab instance's long polling timeout.
# Recommended solutions:
#   1. Increase 'request_concurrency' to 2-4 for 1 runners currently using request_concurrency=1
# Note: The 'FF_USE_ADAPTIVE_REQUEST_CONCURRENCY' feature flag can help automatically adjust request_concurrency based on workload.
# This message will be printed each time the configuration is reloaded if the issues persist.
# See documentation: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#long-polling-issues  builds=0 max_builds=1
# listen_address not defined, metrics & debug endpoints disabled  builds=0 max_builds=1
# [session_server].listen_address not defined, session endpoints disabled  builds=0 max_builds=1
# Initializing executor providers                     builds=0 max_builds=1

# Type Ctrl+C to exit.
ssh team@vps-web.deltasoftware.frl
gitlab-runner register --url https://gitlab.com --token <token>
  • Install nodejs that is needed by GitLabExcercise.

# Fix: E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
# See https://stackoverflow.com/questions/49004853/gitlab-runner-unexpectedly-runs-as-root
# Make GitLab runner service run as root instead of gitlab-runner.
cat /etc/systemd/system/gitlab-runner.service
sudo systemctl status gitlab-runner
sudo systemctl stop gitlab-runner
sudo systemctl status gitlab-runner
sudo vi /etc/systemd/system/gitlab-runner.service
# Replace: "--user" "gitlab-runner" by "--user" "root"
sudo systemctl status gitlab-runner
sudo systemctl daemon-reload
sudo systemctl status gitlab-runner
sudo systemctl start gitlab-runner
sudo systemctl status gitlab-runner

# Fix: fatal: detected dubious ownership in repository at '/home/gitlab-runner/builds/68z10wfSc/0/dhkiestra/gitlabexercise'
# GitLab suggests: git config --global --add safe.directory /home/gitlab-runner/builds/68z10wfSc/0/dhkiestra/gitlabexercise
# See https://stackoverflow.com/questions/75143714/detected-dubious-ownership-in-repository-gitlab-ci-cd
sudo vi /etc/gitlab-runner/config.toml
# Paste the following line after: name = "vps-web.deltasoftware.frl"
# environment = ["GIT_CONFIG_COUNT=1", "GIT_CONFIG_KEY_0=safe.directory", "GIT_CONFIG_VALUE_0=*"]
sudo systemctl stop gitlab-runner
sudo systemctl status gitlab-runner
sudo systemctl start gitlab-runner
sudo systemctl status gitlab-runner

11. Setup CI/CD

12. Publish Package to Registry

13. GitLab CI

13.1. Secrets

  • Select Settings > CICD > Variables.

    GITLAB_ACCESS_TOKEN     KeePassXC: GitLab - Douwe - GitLab Access Token         Avatar > Preferences > Personal access tokens
    GITLAB_DEPLOY_TOKEN     KeePassXC: GitLab - Douwe - GitLab Deploy Token         Settings > Repository > Deploy tokens
    PAT                     KeePassXC: GitLab - Douwe - PAT                         Avatar > Preferences > Personal access tokens
    PROJECT_ACCESS_TOKEN    KeePassXC: GitLab - Douwe - Project Access Token        Settings > Access Tokens

14. Linux

cd ~/gitlab
git clone --recurse-submodules http://gitlab.grendelgames.com/alex/cicd-sandbox.git

15. Windows