Local Runners don't parse the environment in config.toml

Following the documentation found here:

And the attached Example:

  name = "ruby-2.7-docker"
  url = "https://CI/"
  token = "TOKEN"
  limit = 0
  executor = "docker"
  builds_dir = ""
  shell = ""
  environment = ["ENV=value", "LC_ALL=en_US.UTF-8"]
  clone_url = "http://gitlab.example.local"

Problem to solve

I want to expose the local user environment values to the local gitlab runner.
Such as I can retrieve them like $VAR_NAME

  • What are you seeing, and how does that differ from what you expect to see?

Running jobs, the env variables always show up empty

Checkout video here: DevPost Hackathon - DevPost - Gitlab on Vimeo

Hello to the rings and bells of a video for a simple bug report :wink:

Steps to reproduce

Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

This is for the deb version of gitlab-runner, running on pop-os.

I tried several defined locations to configure the environment variables.

And /home/gitlab-runner/.bashrc

With no luck


There is a repository dedicated for this bug report located here:


To reproduce, follow the instruction with a deb installed.


  • Self-managed
  • GitLab.com SaaS
  • [x ] Self-hosted Runners


GitLab Enterprise Edition 16.10.0-pre e102282b0bf

GitLab Runner

Version: 16.9.0
Git revision: 656c1943
Git branch: 16-9-stable
GO version: go1.21.7
Built: 2024-02-15T18:34:24+0000
OS/Arch: linux/amd64