Troubleshooting
Start with glci doctor — it runs pre-flight checks on the container engine (Docker or Podman), the daemon, your GitLab token, CI config, git repository, and the job network in one command:
glci doctor
It always prints the full report, and exits 1 when a check hard-failed — a glci config file that does not parse or holds a value glci run would refuse, engine not reachable, Podman API socket not reachable, CI config file missing, CI config does not parse, not a git repository, containers unable to reach the Docker host (or that check interrupted with Ctrl-C), or an error while checking daemon status — so you can gate on it:
glci doctor && glci run
The Job network row is the one check with side effects: it starts up to two short-lived containers and two throwaway networks (glci-net-probe-*) on the Docker host, and pulls the utility image on a cold machine, all within a 90-second budget. Pass --no-job-network when doctor has to stay free of them.
A stopped daemon, a missing GitLab token, and ignored project-config keys are reported as warnings (~) and keep exit 0: the daemon starts automatically on first use, a token is only needed for remote include: and private registries, and dropped keys are already neutralized. Remediation for a failing row is printed underneath it as an unsymboled → ... continuation line, so it never reads as an extra warning. The report is colored only when stderr is a terminal and NO_COLOR is unset. See glci doctor.
Daemon logs#
Check the daemon log first when something goes wrong:
glci daemon logs # last 50 lines
glci daemon logs -F # follow in real time
glci daemon logs -n 0 # full log
Or read directly:
cat ~/.glci/daemon.log
tail -f ~/.glci/daemon.log
Daemon won’t start#
If a glci command that needs the daemon (glci run, glci daemon start, …) fails with “daemon did not start within 30s”, “daemon exited during startup … (check ~/.glci/daemon.log)”, or one of the errors below:
| Cause | Fix |
|---|---|
| Port conflict (stale socket) | rm ~/.glci/daemon.sock |
| Stale PID file | rm ~/.glci/daemon.pid |
| Permission error | Ensure ~/.glci/ is writable |
daemon exited during startup, and restricting daemon socket ... in ~/.glci/daemon.log | The control socket is group- or other-accessible and glci could not make it owner-only (0700), so it refuses to serve on it. The message names the socket path and its mode - put it on a local filesystem that supports Unix permissions, not a network or VM shared mount; GLCI_DAEMON_SOCK, or a different GLCI_HOME, moves it (no config key does: [network] daemon_socket and [daemon] socket were removed, see Removed keys). A filesystem that simply refuses chmod on a socket is not fatal: glci creates the socket under a restrictive umask, so it logs cannot chmod socket ... it is already private and carries on. |
daemon socket path too long: ... is N bytes and a unix socket path takes at most <limit> here | $GLCI_HOME/daemon.sock (~/.glci/daemon.sock by default), or the path in GLCI_DAEMON_SOCK, is longer than a Unix socket address can hold - 103 bytes on macOS, 107 on Linux - so no daemon could ever listen on it, and glci refuses before starting one. If the message names GLCI_DAEMON_SOCK, shorten that path or unset it; otherwise point GLCI_HOME at a shorter directory - the message gives the longest that fits (91 bytes on macOS, 95 on Linux). |
the running daemon cannot be reached from this shell: daemon socket path too long: ... | A daemon is running, but it was started with a socket path that fits - so with a GLCI_DAEMON_SOCK this shell does not have. glci system cache clean, glci system prune (with or without --all) and glci registry clean refuse, led by what they left undone (cache not cleared:, nothing pruned:, registry not cleaned:), and leave the daemon - possibly serving other shells - running. glci doctor fails its Daemon row with it (and, with no daemon running, with the error above, since the first command that needs one would fail on it), glci daemon status and glci ps fail with it, and glci version and glci log warn with it - log then reads the log from disk. Do not glci daemon stop --force that daemon: nothing is wrong with it. Set GLCI_DAEMON_SOCK to the socket that daemon listens on, or run the command from the shell that started it. Do not shorten GLCI_HOME instead: that switches this shell to another PID file, where the running daemon looks stopped and nothing keeps its volumes from being deleted. |
nothing pruned: the daemon is running N pipeline(s) from glci system prune | Prune stops the daemon so nothing it uses is removed under it, and a stop would cancel those pipelines (pipelines still being prepared count too). Wait for them, or find them with glci ps and stop each with glci stop <id>, then run the prune again. |
nothing pruned: the daemon (pid N) is not responding from glci system prune | The daemon process is alive but does not answer its health check, so prune cannot tell whether it runs a pipeline. glci daemon stop --force kills it; then run the prune again. |
Left N running container(s) in place / Left N stopped job container(s) in place after glci system prune | Prune removes only stopped containers, and none of gitlab-runner’s job containers while a runner container of this GLCI_HOME still runs - both are what glci daemon stop --force leaves running for crash recovery. The next daemon start resumes or removes them; docker rm -f <name> removes one at once. |
glci system prune or a daemon restart leaves old glci-net-* or glci-bus* networks, glci-* volumes or runner-*-project-* containers | Prune and the daemon’s start-up cleanup match engine resources by this GLCI_HOME’s glci.home label, and releases before it labelled networks, volumes and gitlab-runner’s job containers created them without it. List them with glci system engine containers, networks and volumes, and remove them once with docker rm, docker network rm and docker volume rm - making sure no other GLCI_HOME on the same engine is using them. |
The daemon log says keeping network <name>: N container(s) are connected to it on every start | The start-up cleanup never removes a network a container is connected to, even a stopped one: on a shared engine it may be another daemon’s, and a stopped container whose network is gone can never start again. Find the container with docker ps -a --filter network=<name> and, if no other GLCI_HOME uses it, remove it with docker rm; the next daemon start removes the network. keeping network <name>: it was created ... ago clears itself: a network is only removed once it is 15 minutes old. |
Spawn-lock timeout: timed out after 4m0s waiting for another glci process to finish starting the daemon — the container engine is likely unreachable; run `glci doctor`, or `glci daemon stop` to clear a wedged start | Another glci process holds the daemon-spawn lock and is itself stuck starting the daemon — almost always an unreachable container engine. Run glci doctor and fix the engine, or glci daemon stop. The lock (~/.glci/daemon.lock) is advisory and the kernel drops it the moment the holder exits, so never delete the file. |
Force a clean restart:
glci daemon stop --force
glci daemon start
Daemon crashes or misbehaves#
The daemon automatically recovers from crashes on startup. If issues persist:
glci daemon status
glci daemon stop --force
glci daemon start
# Nuclear option: clean all daemon state
glci daemon stop --force
rm -rf ~/.glci/daemon.pid ~/.glci/daemon.sock ~/.glci/daemon.log
glci daemon start
A resumed job’s log stops at the crash#
resume: recover trace for job 17897290900070001: request failed: ...
resume: recover earlier attempt trace for job 17897290900070001: request failed: ...
[runner #1/build-job] resume: cannot rebuild trace file ...
[runner #1/build-job] resume: cannot append to trace file ...
[runner #1/build-job] resume: mock server offers no complete line for job 17897290900070001, leaving ... as it is
When the daemon resumes a pipeline it rebuilds each affected job’s log file from the mock server’s copy of the trace, which is the only record that kept growing while the daemon was down.
Any of these lines means it could not, so the job’s remaining output goes to the event bus alone. The cannot append line means the rebuilt file itself could not be reopened for appending; the others leave the log file as the crash left it.
A job using retry: has its log rebuilt from every attempt’s trace in turn. The earlier attempt line names an earlier attempt whose trace could not be fetched. The log is then rebuilt from the current attempt’s trace alone and keeps streaming, and the daemon log says so with resume: WARNING: the earlier attempts' traces could not be recovered: the earlier attempts’ output is missing from the file, but the current attempt’s is not.
glci log <id> <job> still shows the full trace for as long as the pipeline is running, because that reads the live stream.
Once the pipeline finishes the stream is gone and only the file remains, so the trace ends at the moment the daemon died even though the job ran to completion.
The mock server offers no complete line line is deliberate rather than a failure, and it is reported only when there is a surviving log to protect: the mock server had nothing complete to offer, and overwriting a log that still holds the pre-crash output with nothing would lose the better of the two records.
A job killed before it printed a whole line has no such log, and it resumes normally, carrying the incomplete line forward instead of being refused.
[runner #1/build-job] resume: WARNING: job 17897290900070001 resumes with an unreconciled trace seam; its log may repeat the output printed after the resume
This one is not a truncated log but a duplicated one. Handing the live trace stream over to the rebuilt file leaves a gap about one frame wide, which the daemon closes by reconciling against the mock server’s copy, retrying a few times. When none of those attempts reaches the mock server the gap stays open, and the reconciliation at the end of the job resumes from it rather than from the end, so everything the job printed after the resume can appear in the log twice. The job itself is unaffected, and the duplicate is in the log file alone.
A resumed pipeline warns about the commit it dispatches against#
daemon: resume: warning: no commit recorded for this pipeline, dispatching against "..." from CI_COMMIT_SHA; jobs may fail to check it out
daemon: resume: warning: recorded commit "..." is not a commit id, dispatching against "..." from CI_COMMIT_SHA; jobs may fail to check it out
daemon: resume: warning: recorded ref "..." is not a ref name, dispatching against "..." from CI_COMMIT_SHA; jobs may fail to check it out
glci does not hand the runner your working tree’s HEAD.
It serves a rewritten repository, so the commit jobs check out is a synthetic one, and the daemon records which commit and ref that was in order to resume against the same ones.
Any form of the warning means that record is unusable: the pipeline was prepared by a glci old enough not to write it, its bare repository was never built, or one of the recorded values was rejected as malformed.
The commit and the ref are restored together or not at all, so a bad ref discards the recorded commit as well.
The resumed jobs fall back to CI_COMMIT_SHA, which the served repository may not contain, in which case they fail in Getting source from Git repository with fatal: unable to read tree.
A merge request pipeline also records the CI_MERGE_REQUEST_DIFF_BASE_SHA its jobs were given, a commit of the served repository (see Merge request variables), and restores it only with the commit. daemon: resume: warning: the served commit was not restored, so neither is CI_MERGE_REQUEST_DIFF_BASE_SHA's commit in it or recorded diff base "..." is not a commit id means the resumed jobs get your checkout’s merge base instead, which the served repository lacks, so git diff "$CI_MERGE_REQUEST_DIFF_BASE_SHA"...HEAD fails in them.
Start the pipeline again with glci run instead of resuming it.
Docker image missing or stale#
If glci run fails with glci Docker image not available, the error lists the images glci looked for and the docker pull that fetches the first of them. If you built glci from source, build the image instead:
make docker
After upgrading a source build, always re-run make docker so the local image matches your binary. A local image is not checked against the binary’s commit. glci uses the first image it finds, in the order below, so it cannot tell you that a glci:local is stale.
How the image is resolved#
glci picks its own container image in this order and uses the first one it finds:
registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:<commit>is the image for the exact commit the running binary was built from. glci looks for it locally, then pulls it. This step is skipped when no commit is known or the commit is-dirty(see below).registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:<release>, for example:v0.8.0, is used only when the binary was built from exactly that release tag. glci looks for it locally, then pulls it. CI publishes this tag for every release.glci:localis an image you built withmake docker. It is only looked for locally and never pulled. It comes before:latestbecause it matches the tree it was built from, while:latestcan lag behind a newglci internalsubcommand that the in-container side needs.:latest. It is the only tag here that moves, so a cached copy can be months old. glci refreshes a cached copy with a pull before using it, and gives that pull 30 seconds. If the pull fails or times out, for example when you are offline, glci uses the cached copy and logscould not refresh ... using the cached copy. With no cached copy, it pulls.
The commit and release come from the binary itself, never from a label that the packager passed at build time. A Homebrew build is stamped Homebrew, and glci never uses that as an image tag. glci works out the commit and release from:
- the commit stamped by
make build,make install, CI and the bleeding-edge installer - the commit and tag that GitLab writes into the source when it serves a release tarball (
git archivewithexport-subst, seepkg/version/archive.go). The Homebrew formula builds from that tarball. - the build information the Go toolchain embeds: the module version for
go install …@vX.Y.Z, and the Git revision for ago buildinside a clone, such asbrew install --HEAD
glci version shows what was found, for example glci v0.8.0 (commit 50516e8c…).
Which step you land on depends on how the binary was built:
make build/make installstamp the commit, so resolution starts at step 1.make dockertags its image with that same commit, so aftermake docker && make installthe match is at step 1. That is whydocker psshows the registry-qualified tag, notglci:local.- A modified working tree is stamped
<sha>-dirty. The check usesgit status --porcelain, so a single untracked file is enough to make the tree dirty. A Git build with local changes counts as dirty too. glci treats-dirtyas unpublished and skips steps 1 and 2. It never probes or pulls a-dirtytag and goes straight to yourglci:local, which was built from the same tree. No warning is logged, because that is the intended result. (make dockerin a dirty tree also tags its output<registry>:<sha>-dirty, but resolution never looks at that tag.) - Released and packaged binaries (the one-liner installer, Homebrew,
go install …@vX.Y.Z) match at step 1, or at step 2 when the commit is unknown or its tag is gone from the registry. - A plain
go buildwith no Git information (-buildvcs=false, or a copy of the source without.git) has no identity, so resolution starts at step 3.
A binary with images of its own that still falls through to step 3 or 4 may be running an image that does not match it. This happens when the registry is unreachable, the binary’s tags were deleted, or the commit has not been pushed. glci then logs a warning to ~/.glci/daemon.log that names the image it wanted and the binary’s version:
daemon: warning: glci image <registry>:<commit> (pulling ...: manifest unknown) or <registry>:v0.8.0 (pulling ...) not available; falling back to <registry>:latest, which may not match this binary, glci v0.8.0 (commit …)
To force the published image instead of a local build, note that make docker puts three tags on the same image: glci:local, <registry>:<commit> and <registry>:latest. docker rmi glci:local removes only one of them, so resolution finds the same local build again at step 1 through the commit tag. Remove all of the tags, then restart the daemon, because the resolved image is cached for the daemon’s lifetime:
docker rmi $(docker image inspect glci:local --format '{{join .RepoTags " "}}')
glci daemon stop # the next `glci run` starts a fresh one and pulls a published image
A bare docker pull <registry>:latest moves the :latest tag to the published image, but glci:local and the commit tag still point at the local build. Both win over step 4, so pulling alone does not switch you over. Under Podman, use podman rmi and podman image inspect. glci drives whichever engine [docker] engine selects and prints its error hints with that engine’s binary name.
glci run fails with the glci image ... may not match this binary#
persistent mock not healthy: mock server container exited
the glci image registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:latest may not match this binary, glci v0.8.0 (commit …): refresh it with `docker pull registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:latest`, or set [images] glci = "registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:v0.8.0" in ~/.glci/config.toml
logs: ...
glci runs part of itself inside its container image: the mock GitLab server, and the proxy that the daemon talks to it through. When the image’s glci is a different version from the binary on your machine, the two may not understand each other. For example, the image may reject a flag the binary passes, or speak a different proxy framing. glci detects this and fails within about 30 seconds, naming both sides. Older versions sat at “preparing” forever instead.
To fix it, make the two match:
- Pull the image named in the message. If it is
:latest, the pull replaces a stale cached copy. - Or pin the image for your version with
[images] glci, for exampleglci = "registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:v0.8.0". - For a source build, run
make docker. For a released or packaged binary that landed onglci:local, remove that image withdocker rmi glci:localinstead, because a leftover local build is what hides the published image.
Then run glci daemon stop, because the daemon caches the image it resolved.
The logs: part of the message shows the container’s own output. An unknown flag or unknown command there confirms the image is a different version. The hint is left out when the image that failed is the binary’s own :<commit> or :<release> image, because a version mismatch cannot be the cause there.
Pointing the image somewhere else#
The order above assumes registry.gitlab.com is reachable. Where it is not, set [images] in ~/.glci/config.toml rather than retagging images by hand:
[images]
registry = "proxy.corp.internal/mirror" # rewrites the host, keeps the chain
# glci = "proxy.corp.internal/tools/glci:latest" # or name it outright
registry only swaps the registry host, so the commit-exact tag is still preferred. A per-image glci key is used verbatim — no tag guessing, no :latest fallback, and no glci:local.
The resolved sidecar reference is cached for the daemon’s lifetime, so run glci daemon stop after changing [images] glci or [images] registry — the next glci run starts a fresh daemon and re-resolves. ([images] upstreams is the exception: changing it recreates the mock container on the next run by itself.)
A digest-pinned [images] glci is accepted for Linux but refused when a named runner needs the Windows variant, since a digest cannot name it — use a tag there.
The same section covers the other four images glci pulls for itself (the runner, the helper, the utility image, and binfmt). Retagging a mirrored image to the reference glci expects does still work — glci checks locally before pulling — but it has to be repeated on every Docker host, and a leftover glci:local silently shadows the published image on the next upgrade. [images] has none of those failure modes. Run glci doctor to see what each of the five resolved to and why.
glci refuses to start: [images] ... is unusable#
Some [images] values are refused outright rather than warned about, because resolving them produces a plausible-looking reference pointing somewhere you did not mean — and glci runs these images with the container engine’s socket mounted. The run aborts before anything is pulled:
[images] in the global config is unusable: images.registry: "acmecorp" has no registry host, so it would resolve against Docker Hub — write it as a host and path, e.g. "proxy.corp.internal/mirror"
| Message | Cause |
|---|---|
has no registry host, so it would resolve against Docker Hub | The prefix’s first segment has no dot, no port and is not localhost, so Docker reads it as a Docker Hub namespace. Write proxy.corp.internal/mirror, not mirror. |
must not contain a scheme | An image reference has no https://. A leading scheme is stripped for you; one in the middle is not. |
contains whitespace | Stray space in the value. |
must not start with "-" | A container engine would read the value as a flag. |
is not a usable registry prefix | The value is empty once slashes are trimmed. |
These are separate from the [images] warnings, which are shown by glci doctor and glci config but do not stop a run:
| Warning | Meaning |
|---|---|
images.<kind>: "..." has no tag, so it resolves to :latest | The runner, helper and glci images must match a specific version; pin one. |
images.runner (...) and runner.image (...) both set and differ | Two spellings of one setting; images.runner wins. |
images.upstreams: "..." should be a bare registry host | Write proxy.corp.internal, not a URL or a path. |
registry.push_through is on while images.upstreams restricts pull-through | Pushes still go to the GitLab registry, which the allowlist does not cover. |
Podman#
glci can drive Podman instead of Docker. Select the engine in ~/.glci/config.toml ([docker] engine = "podman", or per-runner [runners.<name>] engine) — there is no --engine flag, and the key is ignored in a project .glciconfig.toml. glci doctor reports the active engine (Docker or Podman); for Podman it also checks the Docker-compatible API socket separately and hints how to start it if it isn’t running.
“cannot connect to Podman” / socket not running#
What you see: Pipelines fail to start with connection-refused errors, or glci doctor reports Podman is selected but unreachable.
Cause: glci talks to Podman over its Docker-compatible API socket, which is not running by default. podman info succeeds without it, which is why glci doctor probes the socket as its own check. Start podman system service:
# Rootless (recommended)
systemctl --user enable --now podman.socket
# Rootful
sudo systemctl enable --now podman.socket
# macOS / Windows
podman machine start
The socket lives at $XDG_RUNTIME_DIR/podman/podman.sock (rootless) or /run/podman/podman.sock (rootful); glci mounts it into the runner at /var/run/docker.sock. On Linux, glci doctor dials every candidate path (an explicit CONTAINER_HOST, then the rootless path, then the rootful one) and reports whichever is reachable, so a rootless setup is never pointed at a rootful socket it doesn’t use. The exception is a remote endpoint: when the resolved Podman endpoint is not a local unix:// path — CONTAINER_HOST, or failing that the default podman system connection, pointing at ssh:// or tcp:// — the socket is on the far side, so nothing on this machine can dial it and doctor reports “cannot verify from host” (a warning, not a failure) even on Linux.
Podman on macOS / Windows (podman machine)#
podman machine is supported. glci resolves the default connection from podman system connection list and exports both CONTAINER_HOST (the ssh:// URI) and CONTAINER_SSHKEY (that connection’s SSH identity). The identity matters: setting CONTAINER_HOST overrides the named connection podman would otherwise read the key from, so without CONTAINER_SSHKEY every later podman call against a healthy machine fails as “not reachable” (exit 125).
The socket glci mounts into containers is the path the machine connection reports — the path on the side the containers actually run on. A default podman machine is rootless inside the VM, so that is /run/user/<uid>/podman/podman.sock. The rootful /run/podman/podman.sock is only used as a fallback and only exists with podman machine init --rootful; mounting it on a rootless machine fails the container with statfs /run/podman/podman.sock: permission denied.
glci doctor reports the Podman socket as “cannot verify from host” on macOS and Windows — and on Linux too whenever the resolved endpoint is remote (ssh://, tcp://), since the socket is equally unreachable from this machine. That is expected, not an error: the check is a warning and does not affect doctor’s exit status. Verify the machine itself with podman machine list.
Docker unreachable but Podman is installed#
What you see: glci doctor fails the engine check with Docker not reachable and warns that Podman is installed.
Cause: Docker is the selected engine (explicitly, or because the running daemon resolved it at startup) but its socket is down, while the podman binary is on PATH. With the engine unset, auto-fallback only kicks in when Podman is actually reachable — an installed Podman whose API socket is down still lands here.
Fix: Either start Docker, or switch engines:
# ~/.glci/config.toml
[docker]
engine = "podman"
Then make sure the Podman API socket is running (see above). If Podman is not installed, doctor instead hints to start Docker (Docker Desktop, colima start, or sudo systemctl start docker).
glci doctor warns about the engine config#
The daemon resolves its engine once at startup, from the global config only. If [docker] engine in ~/.glci/config.toml changed after the daemon started, doctor warns that the running daemon still uses the old one — run glci daemon stop and it re-starts with the new engine on the next command.
A command stops with loading glci config: ... toml: line N#
What you see:
loading glci config: /path/to/repo/.glciconfig.toml: toml: line 2 (last key "skip.jobs"): expected a comma (',') or array terminator (']'), but got end of file
Cause: the named config file is not valid TOML. glci refuses to run rather than proceed with the skip rules, pipeline presets, job overrides and [gitlab] settings the file asked for silently missing.
The same message names ~/.glci/config.toml when the global file is the broken one.
Fix: correct the reported line. For the project file, glci config edit opens it even while it is broken; the global ~/.glci/config.toml has to be edited directly, since config edit never opens it. glci config show prints the same error until it parses, and glci doctor reports it as a failing Project config or Global config row and exits 1.
A broken project file no longer takes a valid global one down with it: whatever parsed is kept, so a dropped error can no longer revert your ~/.glci/config.toml settings (mock server port, Docker host) to built-in defaults behind your back. Resuming an interrupted pipeline stops as well, rather than running the remaining jobs without the [token], [skip] and [manual] rules the project file was holding them to. See Malformed config files.
glci says it is “ignoring” keys from .glciconfig.toml#
What you see: a line like
glci: warning: .glciconfig.toml: ignoring [docker] engine, [docker] privileged, [runners.gpu] docker_host — these settings are only honored in ~/.glci/config.toml, because a project file travels with the repository
glci doctor shows the same text as a ~ Project config row instead of a stray line.
Cause: the keys that decide which container endpoint glci talks to, how far it trusts that endpoint, where a hostname points inside containers, and how much of the host it exposes to containers are global-config-only. A project config travels with the repository, so honoring them would let a cloned repo silently redirect glci to a container daemon of its choosing — along with your working tree, CI variables, and job token — or bind-mount your filesystem into every job. The affected keys are:
| Section | Keys |
|---|---|
[docker] | engine, host, container_socket, privileged |
[paths] | container_builds_dir, container_cache_dir, container_certs_dir |
[network], [network.extra_hosts] | the whole section — host_gateway, bus_subnet, mock_server_port, entries |
[runners.<name>] | engine, docker_host, docker_context, container_socket, tls_cert_path, tls_verify |
[images] | the whole section — registry, glci, runner, helper, utility, binfmt, upstreams |
[runner] | image — the same setting as [images] runner; default_version is not restricted |
[includes] | templates_url — it would decide the jobs of a cross-project trigger target’s templates too |
[token] | forward_host_token, jobs, job_patterns, stages — only when the project value would widen forwarding |
[pipelines.<name>.token] | the whole section, when it would turn forwarding back on |
[runner] / [runners.<name>] | config_template, config_template_file — only when the global config already templates that runner |
[defaults] | executor, image, dirty — default_branch is not restricted |
[registry], [registry.upstream], [daemon] | every key |
The last two rows are settings of your machine rather than of the project (the defaults a job runs with, the registry glci pushes through and its credentials, the one daemon every project shares), so a project file never chose them; the warning is what tells you a value you wrote there is not in force.
The [network] keys are the same handover spelled as a name lookup: host_gateway and [network.extra_hosts] entries are written into every job container’s /etc/hosts, so a repository that set them could point the mock server’s hostname — the API serving your working tree, job payloads and job token — at a host of its choosing; bus_subnet picks the addresses glci’s networks take on your engine; and mock_server_port picks the port of your machine glci publishes. privileged applies to the runner container that holds the engine socket, and the three [paths] container dirs are pasted into gitlab-runner’s [runners.docker] volumes list, which accepts host:container binds — so a project container_cache_dir = "/:/hostroot" would mount your whole filesystem into every job.
Fix: move those keys to ~/.glci/config.toml. Everything else in the project config still applies. See Container-endpoint keys.
glci says a config key “is no longer supported and has no effect”#
What you see: a line like
glci: warning: "/home/you/.glci/config.toml": [daemon] socket is no longer supported and has no effect; remove it from the file — set the GLCI_DAEMON_SOCK environment variable instead
on glci run, show, jobs, lint, variables and config show, as a row in glci doctor, and in the daemon log.
Cause: the file sets a key older versions documented but nothing ever read — for example [runner] args, [network] registry_bind or anything under [tls]. It parses, and changes nothing.
Fix: delete the key from the named file and, if you need what it promised, do what the message says instead. See Removed keys for every key and its replacement.
glci says it is “not reading” a .glciconfig.toml#
What you see:
glci: warning: not reading "/home/you/.glciconfig.toml": a .glciconfig.toml above the repository root no longer applies to the repositories beneath it — move its settings to ~/.glci/config.toml, or into each repository's own .glciconfig.toml, and delete it
Cause: glci looks for the project config the way git looks for .git, from the current directory up to the repository root and no further. Older versions kept walking to /, so a file in $HOME or a workspace directory applied to every repository beneath it — including the one older glci doctor runs left in $HOME. glci says so because that file may hold a setting you rely on, such as a [token] restriction.
Fix: move its settings to ~/.glci/config.toml (for every project) or to each repository’s own .glciconfig.toml, then delete it. See File locations.
paths.container_cache_dir: ... is not a container path#
What you see:
paths.container_cache_dir: "/:/hostroot" is not a container path — it must be an absolute path such as "/cache"; a "host:container" value would bind-mount a host directory into every job container
Cause: container_builds_dir, container_cache_dir, and container_certs_dir end up in gitlab-runner’s [runners.docker] volumes list, which also accepts Docker’s host:container bind syntax. A value containing a colon is therefore a host bind mount, not a mount point, and is rejected wherever it came from.
Fix: use a plain absolute container path (/cache, /builds). container_certs_dir also accepts the Docker named-volume form (certs-vol:/certs), and Windows container paths (C:\builds) are accepted as-is.
A named runner still uses the global endpoint or template#
What you see: a project .glciconfig.toml redefines a runner that also exists in ~/.glci/config.toml, but its jobs keep going to the global docker_host/docker_context — and no key was reported as ignored.
Cause: for a name present in both files every field the global entry owns is carried over — the endpoint fields (engine, docker_host, docker_context, container_socket, tls_cert_path, tls_verify) and the config template — so a project entry cannot erase them either. A bare [runners.gpu] in a project file would otherwise move gpu-tagged jobs onto the local engine with no ignored key to warn about. A project config_template is used only where the global entry has none; when both set one, the global wins and the project’s is named in the ignored-keys warning.
Fix: change the endpoint in ~/.glci/config.toml, or use a different runner name for the project-local runner. See Runner defined in both config files.
Token forwarding rules in .glciconfig.toml are ignored#
What you see: [token] forward_host_token, [token] jobs/job_patterns/stages, or [pipelines.<name>.token] appear in the ignoring warning.
Cause: [token] decides whether your real GitLab token is substituted into CI_JOB_TOKEN for scripts the repository wrote, so a project config may only narrow it. A project forward_host_token = false is always honored; a project true is dropped when your global config explicitly set false; project filters are honored only when your global config sets none (two sets of regexes cannot be intersected). A project pipeline preset’s [token] section is dropped entirely if it would turn forwarding back on, since a selected preset’s [token] replaces the top-level one.
Fix: set the forwarding rules you want in ~/.glci/config.toml, or use --no-token for a one-off run. See Token forwarding in a project config.
Engine selection and auto-fallback#
With the engine unset, glci tries Docker first and auto-falls back to Podman when Docker is unreachable but Podman is. The fallback notice is printed to the terminal the first time the daemon starts (and logged in the daemon log); set engine = "podman" explicitly to silence it. An explicit engine = "podman" never falls back to Docker — if the Podman socket is down, the pipeline fails until you start it.
Note that engine is separate from [defaults] executor: the generated gitlab-runner config always uses executor = "docker" even under Podman, because gitlab-runner has no Podman executor. Do not set executor = "podman".
Docker-in-Docker under Podman#
Rootful Podman runs DinD jobs fine (privileged mode defaults on). Rootless Podman DinD is best-effort and unsupported — privileged nested containers and the docker service alias may not work. Use rootful Podman (or Docker) for pipelines that rely on DinD.
Segmentation faults on Apple Silicon (Colima)#
If jobs crash with signal: segmentation fault (core dumped) from Go toolchain binaries, Colima needs Rosetta enabled:
colima stop
colima delete # needed if changing --vm-type
colima start --vm-type=vz --vz-rosetta --cpu 12 --memory 16
Git repo preparation#
Preparation fails with archive/tar: sockets not supported#
What you see: every glci run in every project stops before any job starts:
creating git repo tarball: creating tar.gz of bare repo: archive/tar: sockets not supported
The daemon log (glci daemon logs) shows the same thing with the project it gave up on:
daemon: pipeline preparation failed for /path/to/project: creating git repo tarball: ...
Cause: git’s builtin filesystem monitor (core.fsmonitor = true, typically set in ~/.gitconfig). glci serves your commit from a bare repo of its own, and while overlaying uncommitted changes it runs git against that repo with your working tree attached. git then starts git fsmonitor--daemon, which binds a Unix socket inside the bare repo — and a socket cannot be put in a tarball. The daemon is also orphaned when glci removes the repo afterwards.
Fix: upgrade glci — this is fixed in releases after v0.8.0. glci now turns the monitor and auto-gc off for the repos it owns and skips anything unarchivable, so your core.fsmonitor setting no longer matters.
On v0.8.0 or older, either skip the overlay (see Dirty mode):
glci run <job> --no-dirty
or turn the monitor off for your user:
git config --global core.fsmonitor false
The scope has to be global. A repo-local core.fsmonitor false has no effect here, because the failing command reads its config from glci’s bare repo, not from your project’s .git. To clean up daemons already orphaned, run git fsmonitor--daemon stop in the affected repo; pkill -f fsmonitor--daemon also works but stops the monitors serving all of your other repos too (git restarts those on demand).
Related: glci runs its own git commands with your GIT_DIR, GIT_WORK_TREE and GIT_CONFIG_* environment overrides stripped, so git settings you export through the environment (rather than a config file) do not reach them.
glci: warning: --dirty overlay failed#
What you see: before the first stage, and again under the summary, glci run prints
glci: warning: --dirty overlay failed, so the run uses the committed tree without your uncommitted changes: <reason>
The TUI shows it under the pipeline title as warning: ..., and --json emits a warning event with code: "dirty_overlay_failed". For a cross-project target the warning appears when its trigger job runs and reads --dirty overlay failed for cross-project "group/project" (trigger job "deploy"), so its pipeline uses the committed tree ....
Cause: glci could not lay your uncommitted changes over the commit (see Dirty mode), so the jobs run the committed code. The reason names what stopped it. Common ones:
git addrefuses a file, for examplecore.safecrlfrefusing a line-ending conversion it could not undo. The reason names the file.- A clean filter marked
required(git-crypt’s is) has no program on the daemon’sPATH. HEADis detached and no branch points at its commit. The reason endsHEAD is detached (<sha>), --dirty requires a branch.
Fix: fix what the reason names, the way you would before git add. For example, normalize the file’s line endings, put the filter’s program on the daemon’s PATH and restart it with glci daemon stop, or check out a branch. If you mean to run the committed code, pass --no-dirty and the warning goes away.
Pipeline hangs or won’t cancel#
glci stop <pipeline-id>
glci stop <id> handles orphaned pipelines automatically — if the daemon lost track of a pipeline (e.g., after a restart), it force-removes leftover containers and the pipeline network, then marks it as canceled in history. Restarting the daemon is only needed if force-stop itself doesn’t resolve the issue:
glci daemon stop
glci daemon start
A log line appears twice when attaching to a running job#
What you see: glci log <pipeline-id> <job-name> on a job that is still running prints one line (rarely a few) twice, right where the catch-up output ends and live output begins.
Cause: glci prints the trace recorded so far, then switches to the live stream. A line written at that exact moment is in both.
This is normal, and deliberate: the alternative ordering would drop such a line instead of repeating it. Reading the log again once the job has finished prints the stored trace, which has no such seam.
“Waiting for pipeline preparation to finish…”#
What you see: Running glci run shows Waiting for pipeline preparation to finish... and does not start immediately.
Cause: The daemon serializes pipeline preparation per directory. Another glci run in the same project is already being prepared, so your request is queued until it finishes.
This is normal. The pipeline will start automatically once the earlier preparation completes. Press Ctrl+C to cancel if you don’t want to wait.
glci rebuilds its cached copy of your repository#
What you see: preparation logs warning: bare repo cache entry is empty (no HEAD commit) or ... is corrupt (HEAD tree unreadable), and the run takes as long as a first run. The lines beginning warning: not caching bare repo — its objects are incomplete, it is shallow, its objects are borrowed through alternates, it has no readable HEAD tree — and warning: git repack failed, not caching this repo are the opposite end: glci declined to store what it had just built, so the next run will be slow too.
Cause: the cached copy under ~/.glci/bare-repos/ is damaged, or the repository glci built is one that would break later if it were reused. An entry is checked before it is published and is moved into place in a single step, so an interrupted run leaves no entry rather than a broken one — seeing the first pair normally means something outside glci reached the directory: a full disk, a filesystem error, a manual deletion, or an entry left by a glci older than these checks.
This is normal, and nothing damaged is ever cached. glci discards the entry and clones from your project instead. A stored repository missing its objects would otherwise be reused by every later run and fail inside the job with fatal: HEAD: not a valid SHA1 or an unreadable tree, which is what the checks exist to prevent — so glci would rather rebuild than keep one it cannot vouch for.
If the same warning appears on every run, the cache is not being replaced: most often the directory is unwritable, or the repository glci builds is one it refuses to store. glci system prune clears the cache entirely, which is also the way out if a stored copy turns out to be damaged in a way only the job notices.
unknown revision for origin/main in a job#
What you see: a job on a feature branch, a tag or a merge request fails on git diff origin/main...HEAD, git log origin/main or git rev-parse origin/HEAD with fatal: ambiguous argument 'origin/main...HEAD': unknown revision or path not in the working tree.
Cause: at the default depth (GIT_DEPTH unset is 20) the runner fetches only the pipeline’s commit and its own branch or tag, as it does on GitLab, so the checkout has no other branch and no origin/HEAD. The same job fails the same way on GitLab.
Fix: fetch the branch in the job (git fetch origin main), or set GIT_DEPTH: 0 to fetch every branch and tag. In glci the fetched origin/main is the commit under test, so the diff is empty, except in a merge request pipeline into main, where it has your checkout’s main files, so a two-dot git diff origin/main HEAD lists the merge request’s changes, and a three-dot git diff origin/main...HEAD its own changes since the merge base (see The merge request’s target branch). See What the runner fetches.
glci clones your repository although a cached copy exists#
What you see: preparation logs warning: could not give the cached repo this run's branch, cloning from the project instead, and the run takes as long as a first run.
Cause: the cached copy is sound, but it was stored by a run on another branch at the same commit, and glci could not give it the branch you have checked out. Usually the branch name starts with -, which glci never passes to git. glci keeps the cached copy and clones from your project, so the run is served the right branch.
Fix: this repeats on every run on that branch. Rename the branch to use the cache again, for example git branch -m -- -odd odd.
Preparation pauses, then logs that the bare repo cache was unavailable#
What you see: waited 3.2s for the bare repo cache lock on <project>, or warning: bare repo cache unavailable, cloning from the project instead.
Cause: each project’s cached repository is guarded by a lock file, ~/.glci/bare-repos/<project>.lock, so that two runs — two pipelines in the same project, a cross-project trigger, or a second glci process — cannot rebuild or discard it underneath each other. One of them waited for another, and the first line is only logged when that wait exceeded a second.
This is normal. Holds are milliseconds in the ordinary case: building a new copy happens outside the lock, and a reader only holds it for a local hardlink clone. If glci gives up waiting it clones from your project instead, which costs time and never correctness. The lock is advisory and the operating system releases it when the process holding it exits, so do not delete the file — deleting it while a pipeline is preparing removes the protection rather than restoring anything. (glci system prune clears the locks along with the cache, but only with the daemon stopped: it stops an idle daemon first and refuses while one runs a pipeline.)
Config template errors#
Template parse error#
What you see: runner.config_template: invalid Go template: ... or runners.<name>.config_template: invalid Go template: ... in glci config output.
Cause: The Go template syntax is invalid (unclosed braces, unknown functions, etc.).
Fix: Check your template syntax. Common mistakes:
| Error | Fix |
|---|---|
unexpected "}" in command | Missing opening {{ |
function "xyz" not defined | Only standard Go template functions are available |
unexpected EOF | Unclosed {{ block |
Template render error#
What you see: rendering custom template for runner "<name>": ... in daemon logs.
Cause: The template references a field that doesn’t exist in the template context.
Fix: Use only fields from the template variable reference. Common fields: .URL, .Executor, .DefaultImage, .PullPolicy.
Key not allowed in a project config template#
What you see: the pipeline fails with
daemon: /path/to/repo/.glciconfig.toml [runners.gpu] config_template sets [runners.docker] host, which a project config may not change because it controls where and how jobs run; move this setting to ~/.glci/config.toml
The message names the config file, the section and the key you wrote, so it points at the exact line to edit. For the default runner the section reads [runner] config_template; glci never says runner "default" or [runners.default], which are internal names you cannot edit.
Cause: a .glciconfig.toml travels with the repository, so its config_template is untrusted input. After rendering, it may not set keys that choose the container endpoint, grant host or privilege access, share namespaces, redirect name resolution, or run code outside the job script. The config_template_file form is checked identically — a path in the project file loads project-controlled content just the same.
Fix: move that key to your own ~/.glci/config.toml, where templates are unrestricted, or drop it. The full list is in restricted keys in a project config template.
Named runner name invalid#
What you see: runners.<name>: name must match [a-zA-Z0-9][a-zA-Z0-9_-]* in glci config output.
Fix: Runner names must start with a letter or digit and contain only letters, digits, hyphens, and underscores.
Jobs not routing to named runner#
What you see: A job runs on the default runner instead of the named runner.
Cause: None of the job’s CI tags: match any named runner name. Tag matching is exact and case-sensitive.
Fix: Ensure the job has a tags: entry that exactly matches the runner name defined in [runners.<name>]:
# .gitlab-ci.yml
my-job:
tags: [gpu] # must match [runners.gpu] in config
script: echo "runs on GPU runner"
Docker networking issues#
Each build gets its own Docker network via FF_NETWORK_PER_BUILD. Job containers reach the mock server via an extra_hosts entry mapping glci-mock to an address of the Docker host — Docker’s host-gateway on Docker Desktop’s WSL2 backend, the gateway of glci’s bus network on every other daemon (see [network] host_gateway) — then the port published on the host. The runner and mock containers share the per-pipeline network for Docker DNS resolution. Problems here usually surface as connection timeouts or host resolution failures inside jobs.
Every job hangs at “Getting source from Git repository”, then fails#
What you see: every job, in every project, sits at Getting source from Git repository for about two minutes and then fails with
fatal: unable to access 'http://glci-mock:39741/...': Failed to connect to glci-mock:39741
after 130000 ms: Could not connect to server
followed by glci’s own explanation, which it appends to any failed job whose log shows it could not connect to the mock server:
WARNING: glci: this job could not connect to glci's mock GitLab server at glci-mock:39741,
WARNING: glci: which serves the repository, artifacts and job API to job containers.
...
WARNING: glci: Run `glci doctor`: its Job network check tests that path and says how to fix it.
Cause: the job container cannot reach the Docker host at the address glci-mock resolves to. Job containers sit on a network gitlab-runner created (FF_NETWORK_PER_BUILD), not on any network glci controls, so they reach the mock server through an extra_hosts entry pointing at the host and the port published there. When that address is not routable from the job’s network the packets are dropped rather than refused, which is why the job waits out the full TCP timeout instead of failing immediately.
On Docker Desktop with the WSL2 backend the cause was the pre-resolved gateway of a glci network: there a bridge’s gateway is not reachable from another bridge. Versions 0.6.0–0.8.0 used the per-pipeline network’s gateway for local jobs on every daemon, Docker Desktop WSL2 included, where every job failed this way — upgrade if glci version reports one of those. glci now uses Docker’s host-gateway sentinel on Docker Desktop WSL2, and the gateway of its persistent bus network on every other daemon, where that address is host-local.
Check it in one step:
glci doctor # the "Job network" row probes exactly this path
Fix: if Job network still fails on a current version, follow the hints under that row, and rule out a host firewall first (iptables -L -n on a Linux Docker host). Where glci uses a network’s gateway, you can switch to Docker’s sentinel — but on a native Linux daemon that is docker0’s 172.17.0.1, so docker login $CI_REGISTRY inside a docker:dind service will be refused:
# ~/.glci/config.toml — honored here only, never in a project .glciconfig.toml
[network]
host_gateway = "host-gateway"
Where glci already uses the sentinel (Docker Desktop WSL2), it knows no better address; if you know one that containers on that host reach it on, pin it — not one in 172.17.0.0/16, which a docker:dind service uses for its own bridge:
[network]
host_gateway = "<ip>"
If you forced host_gateway = "host-gateway" or pinned an address and the row fails, remove it to let glci choose. Then run the pipeline again — the value is read for every pipeline, so the daemon does not need a restart. See Network configuration.
Container can’t reach the mock server#
What you see: Jobs fail with errors like connection refused, no such host, or could not resolve host when trying to reach $CI_SERVER_URL or $CI_REGISTRY.
| Cause | Fix |
|---|---|
| Mock server container crashed | Check glci daemon logs for mock server not healthy errors. Restart the daemon. If the error includes may not match this binary, see glci run fails with the glci image ... may not match this binary. |
| Network was removed mid-run | Run glci daemon stop --force && glci daemon start to recreate networks. |
| Firewall blocking container-to-container traffic | On Linux, check iptables -L -n for DROP rules on the docker0 or br-* interfaces. |
Only inside docker:dind, after the job created networks there: docker login $CI_REGISTRY is refused | A network inside DinD has the same range as glci’s bus network, so DinD routes the bus gateway to its own bridge (#249). glci keeps the bus network outside DinD’s pools (see bus_subnet). Check docker network inspect --format '{{range .IPAM.Config}}{{.Subnet}} {{end}}' glci-bus (Podman: podman network inspect --format '{{range .Subnets}}{{.Subnet}} {{end}}' glci-bus; the name is glci-bus-<pid> when GLCI_HOME is set, and glci-bus[-<pid>]-<runner> on a named runner’s own daemon). If the subnet is not in your [network] bus_subnet range (default 172.16.0.0/16), the daemon log says why: a network from an older glci still in use (glci daemon stop replaces it), or no free subnet in the range (set [network] bus_subnet to a free one). |
Debugging steps:
# List pipeline networks
docker network ls --filter name=glci-net-
# Inspect a specific pipeline network — look for Containers section
docker network inspect glci-net-<pipeline-id>
# Check if the mock server container is running and attached
docker ps --filter name=glci-mock
DNS resolution failures inside jobs#
What you see: getaddrinfo or DNS resolution failed errors for external hosts (e.g., registry.gitlab.com, github.com).
Cause: The job container’s DNS resolver can’t reach an upstream DNS server. Common with custom Docker networks and restricted host DNS configs.
Fix: Check the host’s /etc/resolv.conf or Docker’s DNS settings. If using Colima, restart with --dns to override:
colima start --dns 8.8.8.8 --dns 1.1.1.1
Or configure extra hosts in ~/.glci/config.toml to bypass DNS for known hosts. Each entry is name:address, and they are added to every job container’s /etc/hosts:
[network.extra_hosts]
entries = ["internal-registry.corp:10.0.0.50"]
This key is honored in the global file only — a project .glciconfig.toml that sets it is reported as ignored, because an entry a repository chose could redirect any hostname inside your job containers.
Port conflicts#
What you see: address already in use errors in the daemon log when starting a pipeline.
Cause: The mock server requires port 39741 (default) on the Docker host. This port may be taken by another process or a previous daemon that didn’t shut down cleanly. The embedded registry is served from the mock server’s container on the same port, so it never needs a port of its own. (The mock server’s control port, 39740, exists only on loopback inside the mock container and is never published, so it never has to be free on the host.)
Fix:
# Find what's using the port
lsof -i :39741
# Force-restart the daemon to clean up stale listeners
glci daemon stop --force
glci daemon start
You can change the mock server port in ~/.glci/config.toml:
[network]
mock_server_port = 39741 # default; change requires daemon restart
Note: Changing
mock_server_portrequires a full daemon restart to take effect. The registry’s address is not configurable: theregistry_bindandregistry_http_bindkeys older versions documented had no effect — see Removed keys.
403 from the mock server’s /internal/* endpoints#
What you see: a request such as curl http://127.0.0.1:39741/internal/status, from the host or a job, answers:
the internal API is served only on the mock server's loopback control listener
The mock server’s log also shows a mock-server: refused GET "/internal/status" from ... line.
Cause: this is intended. The internal API controls pipelines: it queues and cancels jobs, sets the pipeline secret, and reports the state crash recovery trusts. So the port that runners and job containers reach refuses it. Only a loopback listener inside the mock container serves it. See Internal API.
Fix: to inspect the mock server’s state while debugging, go through the container as the daemon does:
docker exec glci-mock glci internal proxy GET /internal/status
The persistent mock is named glci-mock, or glci-mock-<suffix> for a daemon with its own GLCI_HOME. docker ps --filter name=glci-mock lists them.
Token & authentication failures#
GitLab token not found#
What you see: gitlab token not set (set GITLAB_TOKEN env var or use --token) or no GitLab token or project configured, using offline parser.
Cause: No token is available, so glci falls back to the offline parser. This means include: project:, include: component:, and remote CI/CD variable fetching are all disabled. The same applies to every config glci parses, not just .gitlab-ci.yml – a child pipeline’s config and a cross-project trigger’s target config resolve their own includes too, and lose the same ones (see Child pipeline is missing jobs).
Fix: Configure a token using any of these methods (first match wins):
# Option 1: environment variable
export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
# Option 2: glab CLI (token is picked up automatically)
glab auth login
# Option 3: config file
cat >> .glciconfig.toml <<'EOF'
[gitlab]
token = "$GITLAB_TOKEN" # env var references are expanded
EOF
# Option 4: command-line flag
glci run --token "glpat-xxxxxxxxxxxxxxxxxxxx"
To see which includes actually resolved, run glci merged – it prints the fully-resolved config on stdout and reports every skipped include on stderr.
A skipped include also stops glci lint from checking any extends: or !reference target the config cannot find, since it may be defined in the skipped file. Lint then reports CI configuration could not be fully verified and lists those targets instead of CI configuration is valid. With a token configured, each target either resolves or is reported as invalid, as GitLab reports it.
For self-managed GitLab instances, also set the URL:
export GITLAB_URL="https://gitlab.example.com"
# or in .glciconfig.toml:
# [gitlab]
# url = "https://gitlab.example.com"
A URL set in the project config only gets a token that the same project config supplies (or an explicit --token) — tokens from GITLAB_TOKEN, glab, and ~/.glci/config.toml are withheld from it (next entries). Set both keys together in .glciconfig.toml, or set the URL via GITLAB_URL / ~/.glci/config.toml / --gitlab-url instead.
Child pipeline is missing jobs#
What you see: a child pipeline runs and passes, but jobs a shared template defines never appear. glci jobs -f child.yml lists them; the child pipeline does not. Or the trigger job fails with extends target ".template-job" not found (referenced by "job").
Cause: the child’s own config, or the trigger’s trigger: include: list itself, uses project: or component: and no token is configured, so the include is skipped. A trigger whose every entry is skipped leaves a child with no jobs, and the trigger job fails with child pipeline has no jobs to run. Whatever it defined is gone – silently if nothing referenced it, as a parse failure if a job extends: one of its definitions.
Both cases log a warning, in the trigger job’s output and in the daemon log:
skipping project include my-group/my-templates: no GitLab token configured
Fix: configure a token (above). If a token is configured and the include still skips, the URL may be withheld from it – see the next entry. To confirm what the child should contain, parse it at top level:
glci jobs -f child.yml
glci merged -f child.yml shows what the child’s includes resolved to, and names the skipped ones on stderr. Without a token, glci lint -f child.yml reports CI configuration could not be fully verified and lists any extends: or !reference target it could not find, which is what the child parse fails on.
GitLab token withheld: “url comes from the project config”#
What you see: glci: warning: [gitlab] url "..." comes from the project config, which travels with the repository, so the token from your <source> was withheld, token = <withheld> in glci config --gitlab, and no include: project:/component: resolution. The <source> is whichever one was dropped: environment (GITLAB_TOKEN / GITLAB_PRIVATE_TOKEN), glab credential-helper, glab CLI config, or global config file (~/.glci/config.toml).
Cause: [gitlab] url is set in the project .glciconfig.toml. That file arrives with the repository, so glci sends a token to that URL only when the repository named the token too — [gitlab] token in the same project file — or when you named it yourself with --token. Everything else is withheld, including [gitlab] token from ~/.glci/config.toml: that is your credential for your own instance, so sending it to a repository-chosen host leaks it just as an environment or glab token would. This is deliberate, not a resolution bug.
Fix: opt in explicitly for that instance, or move the URL to your own config:
# Option 1: name the token for this invocation
glci run --token "$GITLAB_TOKEN"
# Option 2: pair url and token in the config file
cat >> .glciconfig.toml <<'EOF'
[gitlab]
url = "https://gitlab.example.com"
token = "$GITLAB_TOKEN"
EOF
# Option 3: set the URL yourself instead of letting the repo set it
export GITLAB_URL="https://gitlab.example.com" # or ~/.glci/config.toml, or --gitlab-url
Check the URL against the instance you expect before doing any of this — the warning is how you find out that a repository tried to redirect glci. Option 2 pairs the project URL with an env-ref token, which glci reports separately (next entry). See [gitlab] url in a project config.
“the project config sends $VAR to [gitlab] url”#
What you see:
glci: warning: the project config sends $GITLAB_TOKEN to [gitlab] url "https://gitlab.example.com" — both the variable and the URL come from this repository, so check that you trust it with that value.
Cause: the project .glciconfig.toml sets both [gitlab] url and an env-ref token (token = "$GITLAB_TOKEN"), so the repository picked the host variable to read and where its value is sent. Nothing is blocked — this is the documented way to keep secrets out of the file, and a team’s own config legitimately does it — the request is authenticated as normal. The variable name is printed; its value never is.
Fix: nothing, if the config is your team’s own. Otherwise verify the URL before trusting it with that variable, and drop the [gitlab] block from the project config (set the URL and token in ~/.glci/config.toml, or pass --gitlab-url/--token) if you do not. See [gitlab] url in a project config.
CI_JOB_TOKEN permissions differ from production#
What you see: API calls inside jobs succeed locally but fail in real CI (or vice versa), because CI_JOB_TOKEN in glci is actually your personal access token (with different scopes).
Cause: glci forwards your host GitLab token as CI_JOB_TOKEN. In production, CI_JOB_TOKEN is a short-lived token scoped to the job.
Fix:
# Disable token forwarding entirely
glci run --no-token
# Or test with reduced secrets
glci run --secrets none
API returned 401, 403, or 404 when fetching variables#
What you see: Warnings in daemon logs like could not fetch project variables: API returned 401, or project variables you defined on GitLab missing from your jobs.
| Cause | Fix |
|---|---|
| Token expired or revoked | Generate a new PAT on GitLab and update GITLAB_TOKEN |
Token lacks api or read_api scope | Create a token with at least read_api scope |
| Token’s role cannot read CI/CD variables (403) | Variables need at least the Maintainer role; glci skips a 403 silently and runs without them (except for a multi-project target, which warns; see below) |
| Wrong project detected (404) | Check the git remote, or override with glci run --project group/subgroup/project |
| Self-hosted GitLab, wrong URL | Set [gitlab] url in .glciconfig.toml |
The GitLab URL redirects elsewhere: warning: "<from>" redirected a GitLab API request to "<to>", so the token was not sent with it, or for the CI Lint call refusing to follow a POST redirect from "<from>" to "<to>" | Set GITLAB_URL or [gitlab] url to the address that serves /api/v4, usually <to>. See GitLab API token |
A 404 from the project variables endpoint means GitLab has no project at that path that your token can see. glci keeps running without project variables and logs which path it asked for and where that path came from. The result is not cached, so the warning appears on every run until the path is fixed:
daemon: warning: GitLab answered 404 for project "group/old-name" (from the git remote) — no project variables were loaded; check the git remote or pass --project <group/project>
The usual causes are an origin remote that points at a fork, a renamed or moved project, or a typo in --project. Group and instance endpoints are probed on every run and a 403 or 404 there is expected (a group you cannot administer, a non-admin token), so those stay silent.
A multi-project downstream fetches its target project’s variables the same way, and reports trouble in the trigger job’s log rather than the daemon log alone. There a 403 is not silent, because the target then runs without its own project variables:
warning: the token cannot read the CI/CD variables of "group/deployer" (403; reading them takes the Maintainer role), so its pipeline runs without its project variables
warning: GitLab answered 404 for project "group/deployer" (from a cross-project trigger) — no project variables were loaded; check the trigger's project: path, and that the token can see that project
Instance-level CI/CD variables aren’t applied#
What you see: A variable defined as an instance-level CI/CD variable on a self-managed GitLab instance isn’t set in your jobs, or an include: that references it (e.g. project: $_GITLAB_TEMPLATES_REPO) fails with HTTP 404 because the variable wasn’t expanded.
Cause: glci fetches instance variables from GET /admin/ci/variables, which requires an administrator token. With a non-admin token GitLab returns 403 and glci skips them silently. Project and group variables are unaffected. Separately, only glci run fetches CI/CD variables (before it parses, so a fetched one is available for include: path expansion there); glci jobs, show, variables, lint, merged and doctor fetch none, so even an admin-fetched instance variable is not available for their include: path expansion.
Fix: Supply the variable locally so it is available everywhere, including include resolution on every command:
# .glci.env (gitignored), or --env KEY=VALUE, or a pipeline preset
_GITLAB_TEMPLATES_REPO=project/gitlab_templates
_GITLAB_TEMPLATES_REF=1.0.x
Instance variables are fetched under --secrets all (the default for glci run and for runs started from the TUI). See Variables & Secrets for the full precedence order and include-expansion behavior.
Secrets cache is stale#
What you see: Variable values don’t match what you see on GitLab, even after updating them.
Cause: Remote variables are cached in daemon memory for 6 hours by default.
Fix:
# Force a fresh fetch for this run
glci run --refresh-secrets
Or change the TTL in .glciconfig.toml:
[gitlab]
secrets_ttl = "0" # disable caching entirely
Registry & image issues#
Push fails with “unknown blob” or “manifest invalid”#
What you see: docker push $CI_REGISTRY_IMAGE fails with errors about unknown blobs or invalid manifests.
Cause: The embedded registry lost its blob storage (e.g., after a docker volume rm glci-registry-<hash> or glci system prune --all).
Fix:
# Rebuild and re-push — the registry volume was wiped
glci registry clean
glci run
“image blobs not found in local registry”#
What you see: glci registry pull fails with image blobs not found in local registry (image may have been proxied from upstream without caching blobs — re-push the image to persist it).
Cause: The image was pulled through the registry as a read-through cache hit. The manifest is stored locally but the blobs were streamed directly from upstream. Only images explicitly pushed to $CI_REGISTRY have their blobs stored.
Fix: Re-push the image from your pipeline (use docker push $CI_REGISTRY_IMAGE/...) so blobs are stored locally.
A pull-through upstream is skipped, or its private images return 401#
What you see: an image from one of your [images] upstreams is not served through the cache, and the mock server’s log (docker logs glci-mock, or glci-mock-<suffix> for a named daemon) has one of:
registry proxy: not sending credentials to the token realm of <host>: token realm host ... is not on upstream registry ...'s domain: private images then fail with 401, while public ones still pull.registry proxy: refusing token challenge from <host>: realm ... is not an HTTPS URL.- an
error fetching manifest from upstreamorerror fetching blob from upstreamline containingregistry proxy: refusing to connect to <address>.
Cause: the pull-through proxy sends upstream credentials only to a token realm on the upstream’s own host or registrable domain, uses HTTPS realms only, and does not connect to loopback or link-local addresses other than the upstream itself. This stops a hostile upstream from collecting credentials or reaching services next to the proxy (see Pull-through security).
Fix: serve the registry’s token endpoint over HTTPS on the registry’s own domain, for example a self-managed GitLab with its registry on a subdomain of the instance’s domain. Make sure its redirects go to an address that is not loopback or link-local.
Insecure registry / TLS certificate errors#
What you see: x509: certificate signed by unknown authority or server gave HTTP response to HTTPS client when pulling from or pushing to the embedded registry.
Cause: The embedded registry serves plain HTTP, with no TLS certificate. glci marks it as insecure for each client that would otherwise expect HTTPS, but some scenarios break it:
| Cause | Fix |
|---|---|
DinD’s dockerd doesn’t trust the registry | glci injects a daemon.json listing the mock registry under insecure-registries. Check glci daemon logs for could not ensure shared daemon.json volume, then restart the daemon. |
| Buildkit/buildx doesn’t trust the registry | glci injects buildkitd.toml with the registry marked as insecure. If this fails, check glci daemon logs for could not ensure shared config volume. |
| Stale files from an older glci version | Restart the daemon: glci daemon stop --force && glci daemon start. Startup of a daemon on the default home removes the cert and config files older glci versions staged under ~/.glci (registry-certs*, daemon.json, buildkitd.toml, the CA bundles). |
Cross-platform image issues#
What you see: exec format error when running containers, or build failures with wrong-architecture binaries.
Cause: The image was built for a different CPU architecture (e.g., amd64 image on Apple Silicon).
Fix:
# Ensure QEMU binfmt handlers are registered (glci does this automatically)
docker run --privileged --rm docker.io/tonistiigi/binfmt:latest --install all
# For Colima with Rosetta (preferred for Apple Silicon)
colima stop
colima delete
colima start --vm-type=vz --vz-rosetta --cpu 12 --memory 16
If glci daemon logs shows warning: could not install QEMU binfmt handlers, QEMU registration failed. Run the docker run --privileged command above manually.
Note on glci’s own image: glci images built before this was fixed shipped an amd64 binary on every platform, because the Dockerfile put defaults on the BUILDPLATFORM and TARGETARCH build args and those defaults won over the requested platform. Two variants of the same bug:
Published images — the
linux/arm64entry of a multi-arch tag contained the amd64 binary despite the manifest advertising arm64, so on arm64 hosts it ran under emulation or failed outright. Re-pull:latestto pick up a corrected build:docker rmi registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:latest docker pull registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:latestRe-pulling only helps if you track a moving tag. A pinned
:<sha>or release tag is immutable — the image published for it stays amd64 forever, so move to a newer tag (or build locally withmake docker) instead.Local
make dockerimages — same cause, no registry involved:make dockerruns a plaindocker buildwith no--platform, so on Apple Silicon it also produced an amd64glci:local. Re-runningmake dockernow produces a native image.
To check any image yourself — 62 is x86-64, 183 is AArch64:
docker run --rm --entrypoint od \
registry.gitlab.com/gitlab-org/ci-cd/runner-tools/glci:latest \
-An -tu1 -j18 -N1 /usr/local/bin/glci
That inspects the variant your daemon picks for your own platform. Add --platform linux/amd64 or --platform linux/arm64 to inspect a specific entry of a multi-arch tag — running a non-native one needs the QEMU binfmt registration above.
$CI_REGISTRY images fail with wrong platform#
What you see: Jobs that use $CI_REGISTRY/... as their image fail with no matching manifest for linux/arm64/v8 (or another platform) even though the image exists on the real registry.
Pulling docker image 127.0.0.1:32768/group/project/image:v1.0 ...
ERROR: Job failed: failed to pull image "127.0.0.1:32768/group/project/image:v1.0"
with specified policies [if-not-present]: Error response from daemon:
no matching manifest for linux/arm64/v8 in the manifest list entries
Cause: $CI_REGISTRY resolves to the embedded registry (127.0.0.1:<port>), which proxies the image from upstream. When the upstream image is a multi-arch manifest list, the local Docker daemon selects its native platform (e.g., linux/arm64 on Apple Silicon), but the image may only provide linux/amd64 manifests.
This is common with projects that reference $CI_REGISTRY images to avoid external dependencies.
Fix: Two approaches:
Push multi-arch images — if you control the upstream images, build and push them as multi-arch manifests (e.g., with
docker buildx build --platform linux/amd64,linux/arm64). This fixes the problem at the source for all consumers.Use per-job field overrides to force the correct platform without touching
.gitlab-ci.yml:
# .glciconfig.toml
# Nested form
[jobs."renovate_validate".image.docker]
platform = "linux/amd64"
# Or flat dotted key form (equivalent)
[jobs."renovate_validate"]
"image.docker.platform" = "linux/amd64"
# Or override the image entirely to bypass the registry proxy
[jobs."renovate_validate".image]
name = "registry.gitlab.com/group/project/image:v1.0"
# Or apply to every job in the project with a glob pattern
[jobs."*".image.docker]
platform = "linux/amd64"
Push-through mirror failures#
What you see: docker push succeeds locally but the image doesn’t appear on the upstream registry, or pushes fail with setting push-through config: HTTP 4xx/5xx.
| Cause | Fix |
|---|---|
| No upstream credentials configured | Add [registry.upstream] with username and password in .glciconfig.toml |
Token lacks write_registry scope | Create a deploy token or PAT with write_registry |
| Upstream registry unreachable | Check connectivity: curl -s https://registry.gitlab.com/v2/ |
# .glciconfig.toml
[registry]
push_through = true
[registry.upstream]
username = "deploy-token"
password = "$REGISTRY_WRITE_TOKEN"
Remote Docker issues#
When DOCKER_HOST points to a remote machine (TCP or SSH), the daemon and Docker daemon are on different hosts. This changes how bind mounts, networking, and port forwarding work.
Relay proxy containers#
When a named runner targets a Docker daemon on a different machine, glci deploys a relay proxy container (glci-proxy-*) on the remote host to bridge mock server communication. The relay runs whichever image resolution settled on — normally the registry-qualified :<commit>, :<release> or :latest tag, which glci pulls on the remote daemon if it isn’t there. If resolution landed on glci:local, nothing can be pulled: that tag exists only on the machine that built it and no registry serves it.
What you see: Jobs on the remote runner fail with connection refused or response is not application/json when trying to reach the mock server.
Possible causes:
- The glci image is missing on the remote host. A registry-qualified tag is pulled automatically; a
glci:localhas to be copied over:docker save glci:local | docker --context <remote> load. Alternatively build from a pushed commit with a clean tree (make install, or a plaingo buildin the clone), or use a release, so glci resolves a pullable tag in the first place - The relay container crashed — check
docker ps -aon the remote host for exitedglci-proxy-*containers - Protocol mismatch after upgrading glci — old relay containers may use an incompatible muxproto format. Clean up all glci containers on the remote host:
docker rm -f $(docker ps -aq --filter name=glci-)
Cleanup: If relay containers are left behind after a crash, remove them on the remote host:
docker --context <remote> rm -f $(docker --context <remote> ps -aq --filter name=glci-proxy-)
Bind mount failures#
What you see: Job containers start but files are missing, or mounts fail with no such file or directory.
Cause: Bind mounts reference paths on the Docker host, not your local machine. When Docker is remote, /Users/you/project doesn’t exist on the remote host.
Fix: glci works around this by uploading your project as a tarball into the mock server container, so standard job execution works. But if you have custom volume mounts in your CI config, they will reference remote paths.
Localhost port forwarding doesn’t work#
What you see: Jobs try to reach 127.0.0.1:<port> for the mock server or registry, but get connection refused.
Cause: 127.0.0.1 inside a container on the remote Docker host refers to that container’s loopback, not your local machine. The mock server runs as a container on the remote host and is reachable by container name on the pipeline network, not via localhost.
Fix: This should work automatically — glci connects mock and runner containers to the same Docker network. If it doesn’t, check glci daemon logs for network errors.
Wrong Docker endpoint#
glci resolves the Docker host at daemon startup with this priority:
[docker] hostin~/.glci/config.toml(highest; ignored in a project.glciconfig.toml— see Container-endpoint keys)DOCKER_HOSTenvironment variable- Docker context (
docker context use/DOCKER_CONTEXT) - Default Docker socket
DOCKER_HOST outranks the active context, matching the docker CLI — so an endpoint left over in your shell wins over docker context use. Under Podman the order is [docker] host, then CONTAINER_CONNECTION, then CONTAINER_HOST, then the default connection (Podman itself ranks the connection above the host variable).
If glci reaches an unexpected daemon:
glci daemon status # engine endpoint + where it was resolved from
env | grep -E 'DOCKER_HOST|DOCKER_CONTEXT|CONTAINER_HOST|CONTAINER_CONNECTION'
unset DOCKER_HOST && glci daemon stop # fall back to the context; stop applies it
The glci daemon stop is required: the running daemon keeps the endpoint it resolved at startup, so unsetting the variable alone changes nothing. glci warns when it notices the mismatch — including the case where you removed a selection the daemon still has — but it never restarts the daemon for you, because that would let two shells with different DOCKER_HOST values fight over one daemon.
Set the host explicitly in config to override all auto-detection:
# ~/.glci/config.toml
[docker]
host = "ssh://my-server"
glci config show --network prints the configured [docker] host value only — it does not reflect DOCKER_HOST, the active context, or the engine default. Use glci daemon status or glci doctor for the endpoint actually in use.
Variable resolution issues#
Variables not resolving#
What you see: Job scripts contain literal $MY_VARIABLE instead of its value, or variables are empty.
Cause: The variable isn’t defined at any level, or it’s defined at a lower-precedence level and overridden to empty.
Variable precedence (lowest to highest):
| Priority | Source | How to set |
|---|---|---|
| 1 (lowest) | CI-derived | Automatic (git SHA, branch, etc.) |
| 2 | Global YAML | variables: at top of .gitlab-ci.yml |
| 3 | Job YAML | variables: inside a job definition, parallel: matrix: values, a matched rules: variables: |
| 4 | Dotenv artifacts | artifacts: reports: dotenv: from dependency jobs |
| 5 | Instance variables | Fetched from GitLab API (admin token; --secrets all) |
| 6 | Group variables | Fetched from GitLab API (--secrets all) |
| 7 | Project variables | Fetched from GitLab API |
| 8 | Trigger variables | What a trigger job forwarded, in a child or cross-project pipeline |
| 9 | --env flags | glci run --env KEY=VALUE |
| 10 | --env-file | glci run --env-file .env.local |
| 11 | Pipeline preset env | env of the --pipeline preset, over the env of the [contexts] preset the context names |
| 12 (highest) | .glci.env | Auto-loaded from project root |
This is GitLab’s order, so a job’s own variables: value is overridden by a CI/CD variable or an --env of the same name. Run glci run --show-variables to see which layer each value came from (with --json, each variable’s overridden field lists the values it shadowed).
Debugging steps:
# Override a specific variable for testing
glci run --env MY_VARIABLE=test_value
# Use --secrets none to test without remote variables
glci run --secrets none --env MY_VARIABLE=test_value
Dotenv variables not appearing in downstream jobs#
What you see: A producer job creates a dotenv report artifact but the consumer job does not have the expected variables.
| Cause | Fix |
|---|---|
Consumer in the same stage with no needs: | Dotenv vars propagate automatically from prior stages. For same-stage producers, add needs: [producer] |
| Dotenv file has invalid format | Keys must match [a-zA-Z_][a-zA-Z0-9_]*. Lines with invalid keys are skipped silently |
| Too many variables | Only the first 20 variables are kept (matching GitLab’s default limit) |
| File too large | Decompressed dotenv file must be under 5 MB |
| Parse error in dotenv file | Check daemon logs for warning: failed to parse dotenv artifact messages |
The need has artifacts: false, or the job has dependencies: [] or a dependencies: list without the producer | As on GitLab, these block the dotenv variables along with the files. Drop artifacts: false, or list the producer |
| The consumer is in a downstream pipeline | A trigger job forwards the dotenv variables it imports only with forward: pipeline_variables: true (see Dotenv in a trigger job) |
.glci.env not loading#
What you see: Variables defined in .glci.env are not available in jobs.
| Cause | Fix |
|---|---|
| File is in the wrong directory | .glci.env must be in the project root (same directory as .gitlab-ci.yml) |
| File has syntax errors | Each line must be KEY=VALUE. No spaces around =. No quotes needed. |
| File has a BOM or wrong line endings | Save as UTF-8 without BOM, with LF line endings |
Example .glci.env:
MY_SECRET=s3cr3t
DEPLOY_TOKEN=glpat-xxxx
DB_PASSWORD=hunter2
--secrets none still shows some variables#
What you see: Variables like CI_REGISTRY, CI_PROJECT_PATH, etc. are present even with --secrets none.
Cause: --secrets none only disables fetching remote variables from the GitLab API (project and group variables). CI-derived variables (git info, registry URLs) and YAML-defined variables are always resolved.
A CI_*_SLUG value changed#
What you see: after upgrading, a cache keyed on $CI_COMMIT_REF_SLUG misses once, an artifact path or a review-app hostname built from a slug is spelled differently, or glci variables --all prints a slug that does not match the one it printed before — with no change to the pipeline.
Cause: glci computed slugs with an algorithm that diverged from Gitlab::Utils.slugify in two places. It collapsed runs of separators, which GitLab does not do, and it stripped leading and trailing separators before truncating to 63 characters rather than after, so a leading run cost nothing against the budget. Both are now correct, and five variables are affected: CI_COMMIT_REF_SLUG, CI_PROJECT_PATH_SLUG, CI_PROJECT_NAMESPACE_SLUG, CI_DEFAULT_BRANCH_SLUG and CI_JOB_NAME_SLUG.
| input | before | now | GitLab |
|---|---|---|---|
branch feature/my__branch | feature-my-branch | feature-my--branch | feature-my--branch |
job build::linux | build-linux | build--linux | build--linux |
branch a...b | a-b | a---b | a---b |
A value with no adjacent non-alphanumerics, 63 characters or fewer, is unchanged, so main, master and release/1.x all keep the slug they had.
Fix: nothing — the values now match what GitLab publishes for the same ref or job name, which is what a pipeline written for GitLab expects. A cache or artifact keyed on a slug is looked up under the corrected name from now on, so the first run after upgrading repopulates it. CI_ENVIRONMENT_SLUG is a different algorithm upstream, and the one thing that changed there is the input (see below).
CI_PROJECT_ROOT_NAMESPACE_SLUG was not published at all before and is now, so a pipeline that referenced it was getting the literal $CI_PROJECT_ROOT_NAMESPACE_SLUG and now gets the slug of the top-level group.
CI_ENVIRONMENT_SLUG changed, or a review app deployed under a new name#
What you see: a job whose environment: name: contains a variable deploys to a different environment than before, or $CI_ENVIRONMENT_SLUG inside such a job spells the hostname differently.
Cause: glci derived CI_ENVIRONMENT_NAME and CI_ENVIRONMENT_SLUG from the unexpanded environment: name: literal. GitLab expands the name first and slugs the expanded value, and the slug’s hashed suffix is taken over whichever string it was built from, so the two never agreed for a name containing a variable.
environment: name: | before | now, and on GitLab |
|---|---|---|
staging-$TIER (TIER=eu) | staging-tier-6i9wc8 | staging-eu |
review-app/$CI_COMMIT_REF_SLUG (my-branch) | review-app-ci-com-csgbr6 | review-app-my-bra-hd45re |
A name with no variable reference in it is unchanged.
Fix: nothing. The slug now names the environment GitLab would deploy to. A local deployment target created under the old name is orphaned and can be removed. environment: url: is still left unexpanded, as GitLab leaves it, so the runner expands it at job time against the corrected CI_ENVIRONMENT_SLUG.
changes: matches every job on a branch push#
What you see: under a branch context (the default on a checked-out branch), every job gated on rules: changes: is in the pipeline, whatever you changed.
Cause: the push has no diff, so changes: matches, as GitLab’s does for a pipeline with a blank before_sha. glci compares a branch push from the remote’s commit for the branch, read from your remote-tracking refs, and finds none, or finds that it already has HEAD:
- the branch was never pushed, so the remote does not have it;
- the repository has no remote, or its remote is not called
originand the branch has no upstream (git push gitlab featurewithout-u); HEADis already pushed, and the tree is clean or the run uses--no-dirty.
Fix: push the branch with -u, or set its upstream with git branch -u <remote>/<branch>, so glci finds the remote’s commit. A pushed branch compares the commits you add, and your uncommitted changes under --dirty. To compare against the target branch instead, use --context merge_request. See The changes diff.
CI_MERGE_REQUEST_DIFF_BASE_SHA is missing, or changes: matches everything#
What you see: in a clone with no local copy of the target branch, rules: if: $CI_MERGE_REQUEST_DIFF_BASE_SHA == null takes the null branch, rules: changes: matches every job, and stderr carries merge-base "main" HEAD failed.
Cause: the target branch is named bare (main), and git clone --single-branch -b feature, a worktree cut from a bare mirror and a CI checkout all leave origin/main with no local main for that name to resolve to. glci now tries main, then origin/main, then refs/remotes/origin/main, in both the variable and the changes: evaluator.
Fix: nothing in a clone that has the remote-tracking ref. A shallow clone that shares no history with the target has no merge base at all, and there the variable is still omitted (GitLab always publishes it with a value, so an empty one is a shape it cannot produce); fetch enough history, or name a target the clone has with --mr-target. The notice is printed once per repository and target rather than on every command.
Child pipeline & include resolution#
Child pipeline include not found#
What you see: the trigger job fails with resolving child includes for "<job>": child pipeline include "child.yml": stat /<repo>/child.yml: no such file or directory, or child pipeline include "..." escapes project directory (trigger includes resolve from the repository root ...), for a file that is clearly there next to the CI file. A path naming no location at all (/, ///) reports not a path in the repository, and one reached through a symbolic link is refused as described in A local include is refused as outside the repository. The path in the message is the one glci actually tried. As on GitLab, a failed downstream pipeline (config_error) carrying the same message is recorded and linked from the trigger job; glci history lists it with 0 jobs.
Cause: trigger: include: local: paths resolve from the repository root, which is where GitLab reads them from — not from the directory holding the CI file or the one you ran glci in. A CI file in a subdirectory that names child.yml is asking for <repo-root>/child.yml. An entry with rules:, or with a $VARIABLE in its path, is checked only after its rules are evaluated and its variables expanded, as GitLab does, so a rules-gated optional include whose file is absent does not fail the trigger job.
Fix: write the path as GitLab reads it, from the repository root:
# apps/web/.gitlab-ci.yml
child:
trigger:
include: apps/web/ci/child.yml # not ci/child.yml
Leading slashes are stripped and mean the same thing (/apps/web/ci/child.yml). A path that climbs out of the repository is rejected, because GitLab has no such file to read either — so a pipeline that relied on it was already failing upstream.
An include fails with “resolving inputs”#
What you see: a configuration that used to lint clean now fails, naming the include it came from:
CI configuration is invalid: parsing CI config: resolving includes: include local "/ci/comp.yml": resolving inputs: required input "env" not provided
Cause: the included file declares spec: inputs: and the include entry does not supply a value for one of them that has no default. This used to be a warning: glci merged the file uninterpolated and reported the pipeline valid, so every $[[ inputs.env ]] stayed literal. That is worse than failing — a job named through such a placeholder is never matched by an extends: or a needs:, and a job whose image: was the placeholder is created with no image at all and silently runs on whatever it inherits. GitLab refuses the pipeline outright, so failing is what agreeing with it looks like.
Fix: supply the input on the include entry. An included file’s inputs come only from its own entry — --input and --inputs-file reach the root file’s spec: and nothing else, which is also true on GitLab, so there is no flag that works around this.
include:
- local: /ci/comp.yml
inputs:
env: staging
If the input should have had a default, add one to the component — either directly or through rules:.
If the entry supplies the input under a misspelt name, you see unknown input arguments instead. See the next section.
The same holds for a malformed spec: inputs: in the root file, including a rules: list that declares an unknown key, omits a rule’s default:, or is combined with a top-level default:/options:. That is a hard error on every route now. It used to be reported only by the offline parser, so the same configuration passed silently under GLCI_PREFER_API=1: the document went to the Lint API with its $[[ inputs.X ]] placeholders intact, came back valid, and the pipeline ran with the literal text in place of the values.
An include fails with “unknown input arguments” or “Given inputs not defined”#
What you see: a configuration that used to lint clean now fails on an include entry’s inputs::
CI configuration is invalid: parsing CI config: resolving includes: include local "/ci/comp.yml": unknown input arguments: enviroment
CI configuration is invalid: parsing CI config: resolving includes: include local "/ci/plain.yml": Given inputs not defined in the `spec` section of the included configuration file
Cause: the include entry supplies an input that the included file’s spec: header does not declare, or it supplies inputs to a file that has no spec: header at all. glci used to drop such arguments. An input with a default then silently took that default, and a pipeline GitLab refuses was reported valid. An input with no default was reported as not provided, which pointed at the wrong problem. GitLab refuses both cases with these same messages, so a typo surfaced only after you pushed.
Fix: spell the argument the way the header declares it, or remove it. For a file that should take inputs, give it a header: a spec: document, then ---, then the jobs. A file with spec: at its top level and no --- has no header, so GitLab reads its spec: as a job and refuses the file (see A top-level key that is no job is now refused).
--input fails with “unknown input arguments” or “Given inputs not defined”#
What you see: glci run, lint, show, jobs, variables, merged or doctor refuses a value given with --input or --inputs-file, naming the root CI file:
CI configuration is invalid: parsing CI config: `.gitlab-ci.yml`: unknown input arguments: enviroment
CI configuration is invalid: parsing CI config: `.gitlab-ci.yml`: Given inputs not defined in the `spec` section of the included configuration file
Every one of them except doctor prints it this way and exits 1, glci run included; doctor fails its CI config row. A root file whose spec: has no --- after it gets ; a top-level spec: is a header only when a `---` line and the pipeline follow it added. glci retry replays the inputs the original run was given, so it is refused too once the file no longer declares one of them.
Cause: the root file’s spec: header does not declare that input, or the root file has no spec: header at all. GitLab creates a pipeline by including its CI file with the pipeline’s inputs, so it refuses both cases with these messages, naming the file by its path in the repository. glci used to drop such values. A misspelt name ran the pipeline with the input’s default, and inputs for a file without a header were ignored entirely, so the pipeline ran locally and failed on GitLab. Several unknown names are listed together, sorted.
Fix: spell the input the way the header declares it, or drop the flag. For a root file that should take inputs, give it a header: a spec: document, then ---, then the jobs. A root file with spec: at its top level and no --- has no header, and is refused with or without --input (see A top-level key that is no job is now refused). A root file with no spec: at all is never refused for running without --input.
$[[ inputs.X ]] in an included file stays literal#
What you see: a block from an included file reaches a job name, an image: or a script as written, $[[ inputs.env ]], although the root pipeline declares env and sets it.
Cause: each file is interpolated only against its own spec: header, as on GitLab. The root pipeline’s inputs never reach an included file, and a file with no header is not interpolated at all. glci used to substitute the root’s inputs into an included file with no header, so a configuration that relied on it ran locally and broke on GitLab.
Fix: give the included file a header that declares the input (a spec: document, then ---, then the jobs) and pass the value through the include entry’s inputs:. See how values are substituted.
include:
- local: /ci/deploy.yml
inputs:
env: $[[ inputs.env ]]
An input is refused against its options:#
What you see: an input that used to resolve now fails with one of GitLab’s messages:
`env` input: `qa` cannot be used because it is not in the list of allowed options
`count` input: `3` cannot be used because it is not in the list of the allowed options
`flag` input: Options can only be used with string, number, and array inputs
input "env": options array cannot contain null values
Cause: glci used to compare each value with its options as rendered text. It now compares them the way GitLab does, by type, and refuses what GitLab refuses:
- A
booleaninput declares a top-leveloptions:. GitLab refuses any, even[true, false]. - A
numberinput lists quoted options, such asoptions: ['1', '2']. Those are strings, so no number matches them. options: []admits no value. It used to admit any value.- A rule’s
default:is compared with itsoptions:as written, sodefault: '1'is not amongoptions: [1, 2]. - A top-level
options:is not a list, has more than 50 entries, or holds anull. - An
arrayinput withoptions:is given a value that is not an array (`list` input: provided value is not an array).
An array input is now checked element by element, so a value such as ["dev", "staging"] that used to fail against options: [dev, staging, production] now passes.
Fix: drop options: from a boolean input, unquote numeric options (options: [1, 2]), and remove null entries. Pushing the same configuration to GitLab fails the same way. See Validation.
A boolean input now refuses yes, 1 or TRUE#
What you see: a type: boolean input that used to resolve now fails with GitLab’s message. glci adds a hint for a value that reads as a boolean:
CI configuration is invalid: parsing CI config: resolving pipeline inputs: `flag` input: provided value is not a boolean; write true or false
CI configuration is invalid: parsing CI config: resolving pipeline inputs: resolved default: `flag` input: default value is not a boolean; write true or false
An included file names the include it came from instead: resolving includes: include local "/ci/comp.yml": `flag` input: provided value is not a boolean.
Cause: glci used to accept yes, no, 1 and 0 as text, and true or false in any letter case, wherever the value came from. GitLab accepts only a YAML boolean or the text true/false, so it refuses --input flag=yes, a quoted "yes" or "TRUE", and the integer 1. glci retry replays the inputs the original run was given, so retrying a run that passed --input flag=yes fails the same way.
Fix: pass --input flag=true or --input flag=false. In YAML, write the value unquoted (flag: yes or flag: true). An unquoted yes, no, on or off is a YAML boolean, so it still passes. See Boolean inputs.
An --inputs-file that is not a mapping of input names to values, such as a list, now fails with parsing inputs file: must be a mapping of input names to values. It used to supply no inputs without saying so.
A number input now refuses .5, Inf or 1.e3#
What you see: a type: number input that used to resolve now fails with GitLab’s message:
CI configuration is invalid: parsing CI config: resolving pipeline inputs: `n` input: provided value is not a number
CI configuration is invalid: parsing CI config: resolving pipeline inputs: resolved default: `n` input: default value is not a number
An included file names the include it came from instead: resolving includes: include local "/ci/comp.yml": `n` input: provided value is not a number.
Cause: glci used to accept anything Go’s float parser reads. GitLab reads a number input with its JSON parser, which refuses text such as .5, Inf, inf, NAN and 1.e3, and accepts NaN, nan, Infinity, +5 and 007. A number input is also substituted as Ruby prints it now, as on GitLab: 1e3 is 1000.0 and 007 is 7, where glci used to substitute the text as written. glci retry replays the inputs the original run was given, so retrying a run that passed --input n=.5 fails the same way, and one that passed --input n=1e3 now substitutes 1000.0.
Fix: pass --input n=0.5, Infinity or 1.0e3. In YAML, an unquoted .5 or .inf is a YAML number and still passes; only the quoted text is refused. See Input types.
A job whose rules: come from an array input now waits as manual#
What you see: after upgrading, a job that takes its rules: or needs: from an array input, as many CI/CD Catalog components do (rules: $[[ inputs.rules ]]), behaves differently: it now waits as manual, is skipped by a when: never rule, or no longer downloads a need’s artifacts.
Cause: glci used to turn each hash item of the array into a string such as map[if:$CI_COMMIT_BRANCH when:manual], so every rule was ignored and the job ran as on_success. Each item now stays a hash, as on GitLab.
Fix: nothing to fix; the job now behaves as it does on GitLab. See How values are substituted.
A spec:include file fails the parse#
What you see: a file whose spec: header loads input definitions with spec: include: fails with one of:
spec:include: Duplicate input keys found: environment. Input keys must be unique across all included files and inline specifications
spec:include local "shared-inputs.yml": header include file contains unknown keys: job (only inputs: is allowed)
spec:include project "my-group/shared" file "inputs.yml": a GitLab token is required to fetch input definitions from another project
Cause and fix: glci reads spec:include files the way GitLab does, so the first two are also refused on push. The third is glci’s own: GitLab always has the credentials to read another project, and glci needs a token for it.
- An input defined in two included files, or in an included file and the inline
inputs:, is not overridden. Keep one definition and remove the other. - An included file may hold only an
inputs:mapping. Move jobs and other keys to a file you pull in with an ordinaryinclude:. - A
project:entry is fetched through the GitLab API. Pass--tokenor setGITLAB_TOKEN, or use alocal:copy of the file.
Before glci supported spec:include, a file that used it failed with unknown interpolation provided: `environment` in `inputs.environment` , because the included inputs were never loaded. See Input definitions from other files.
A wildcard include merges fewer files than on GitLab#
What you see: include: local: 'ci/**/*.yml' (or a trigger: include: wildcard) resolves to fewer jobs locally than the same pipeline produces on GitLab, with no error — the pipeline just runs a smaller set.
Cause: one of three, in rough order of likelihood.
- The file is gitignored. Wildcards resolve against the project’s non-ignored files, so a generated fragment written into a
.gitignored path is not includable. GitLab resolves includes out of the repository and would not see it either — meaning the pipeline is already smaller upstream than the ignored file suggests. - The file is inside a submodule. Git reports a submodule as a single entry, not as its contents, so nothing under it can be included. GitLab cannot include across a submodule boundary either.
- The pattern used
?,[or{expecting shell-glob behaviour. Only*is a wildcard in an include path; the rest are literal filename characters, soci/[ab].ymlnames one file called exactly that. See wildcards in include paths.
Fix: check what actually got merged:
glci merged
glci merged prints the fully-resolved configuration, so a file you expected is either in there or it never matched. If it is gitignored, commit it or stop ignoring it — that is also what makes it work on GitLab.
An included file’s jobs are missing#
What you see: the jobs of a file named in include: are absent from glci jobs, glci show and glci merged, with no error, while the file is plainly there.
Cause: the entry carries rules: that do not match in the context glci simulates, so the file is dropped before it is read, as GitLab drops it. In the top-level pipeline, include rules see the context’s predefined variables and the local variable layers (--env, --env-file, a preset’s env, .glci.env), not the global variables: block. On glci run they also see the instance, group and project CI/CD variables fetched from GitLab, beneath the local layers; glci jobs, show, variables, lint, merged and doctor fetch none, so an include gated on a project variable can be missing there and present on glci run. In a child or multi-project downstream pipeline they also see the fetched CI/CD variables and the variables the trigger job forwards, but not the downstream’s own global variables: block; a multi-project pipeline’s see the target’s predefined variables, not the upstream pipeline’s. glci lint, merged and doctor have no --context, so they decide them against the -p preset’s context or the pipeline pushing HEAD would create.
Fix: simulate the context the include is meant for, or supply the variable its if: tests:
glci jobs --context tag=v1.0.0
glci jobs --env DEPLOY_ENV=prod
See Include rules.
Listing a project’s files for rules: exists: fails#
What you see: warnings from a config whose include: project: or component: file has nested includes with rules: exists:, and the parse goes on. glci lint, jobs, show, variables and merged print them on stderr, as below; on glci run the daemon parses, so they are in the daemon log (glci daemon logs), prefixed daemon: instead of glci:, and for a downstream pipeline in its trigger job’s log:
glci: include rules in "my-group/shared-ci" at "v2": cannot list its files (...); a rules:exists: there is undecided, and the include it guards is kept
glci: include local "ci/deploy.yml": glci cannot list the files of "my-group/shared-ci" at "v2" that rules:exists: matches against; the include is kept
The first names the listing error, such as the HTTP status the API returned (403, 404). When the kept file does not resolve either, a third warning says the include is kept only because glci cannot decide its rules, and it does not resolve, so it is left out (or and its location is invalid, so it is left out, for a location not ending in .yml/.yaml), and a rule GitLab refuses inside that file then refuses nothing.
Cause: such an exists: checks that project’s tree at its ref, as on GitLab, and glci lists the tree through the GitLab API. The listing failed: the token lacks the read_api scope (a token with only read_repository fetches the included files, through the repository files API, but cannot list the tree), the token has no access to the project, or the instance cannot be reached (offline, with the included file served from glci’s include cache, or a network error). glci cannot tell whether the rule matches, so it leaves the rule undecided and keeps the include, since GitLab may well include it.
Fix: use a token with the read_api (or api) scope and access to the project, and check that the GitLab instance is reachable. See Include rules.
Include path must end in .yml or .yaml#
What you see: CI configuration is invalid: parsing CI config: resolving includes: local include "ci/child.txt": path must end in .yml or .yaml, for a file that exists and holds perfectly good YAML.
Cause: GitLab accepts an include location only when its last path segment ends in .yml or .yaml (YAML_ALLOWLIST_EXTENSION, checked before the file is read). A config naming ci/child.txt cannot run on GitLab, so glci rejects it too rather than reporting a green pipeline you cannot push. The rule is case-insensitive (ci/child.YML is fine) but needs at least one character before the dot, so a file literally named .yml is rejected.
Fix: rename the file to .yml/.yaml and update the include. Three cases catch people out:
- A wildcard is expanded before it is checked, so each match is validated individually and the pattern itself never is.
local: 'ci/*'fails whenci/holds aREADME.md; constrain it tolocal: 'ci/*.yml'and the sameREADME.mdis ignored. The message names both, so you can find the pattern in your config:local include "ci/*" matched "ci/README.md": path must end in .yml or .yaml. - A remote URL’s query string or fragment is part of the name GitLab checks.
remote: https://.../f.yml?ref_type=heads— what the GitLab UI’s Open raw button gives you — is rejected despite ending in.ymlto the eye. The message tells you to strip from the?on, and only says so when stripping actually fixes it. - Two kinds of include are exempt.
component:, whose location isFQDN/project/name@versionand never ends in.yml, and any location still holding an unexpanded$VAR, which glci reports through the fetcher’s own error instead. - An entry whose
rules:drop it is never checked, because GitLab discards it before it validates it. One itsrules:keep is checked like any other.
This covers top-level include: only. A trigger: include: location is checked when the child pipeline is created, so glci lint passes and the trigger job fails — which is how GitLab behaves too.
A local include is refused as outside the repository#
What you see: CI configuration is invalid: parsing CI config: resolving includes: local include "../shared.yml" escapes project directory, or local include "alias.yml": a symbolic link, which GitLab does not follow. Under GLCI_PREFER_API=1 the middle of that wrapper reads resolving local includes: instead. A trigger: include: produces the same two refusals, the first naming the repository root it resolved from. A wildcard names the pattern you wrote as well as the file it matched: local include "ci/*.yml" matched "ci/alias.yml": a symbolic link, which GitLab does not follow, and a link in a directory component names that component: local include "vendor/ci.yml": "vendor" is a symbolic link, which GitLab does not follow.
Cause: an include: local: names a file GitLab could not read, so glci refuses it rather than reporting a green pipeline you cannot push. Two ways that happens:
- The path leaves the repository.
../shared.ymlis the obvious case. A leading slash is not a filesystem absolute — GitLab strips it (Gitlab::Utils.remove_leading_slashes), so/etc/passwdis looked up as<repo-root>/etc/passwdand simply is not found. - The path goes through a symbolic link. GitLab reads includes out of the git object database, where a symlink is a blob holding the target’s path rather than a followed link. It therefore never traverses through one (
link/ci.ymlanswersLocal file 'link/ci.yml' does not exist!) and never follows one, reading the link’s own text and reportingInvalid configuration format. glci refuses both, which is why a link is rejected even when its target is inside the repository. glci reads your working tree, so an untracked link is refused the same way a committed one is.
Fix: move the shared file into the repository and reference it directly, or, for a file that genuinely lives in another project, use include: project: — which is the keyword for that and works on GitLab. Replace a symbolic link with the real path.
An include entry whose rules: drop it is never read, so neither refusal applies to it, as GitLab never examines it either. One its rules: keep is refused like any other.
A local include fails lint although GitLab accepts it#
What you see: CI configuration is invalid: parsing CI config: ...; GitLab Lint API also failed: checking the files the Lint API read: the Lint API read the default branch's copy of local include "sub/child.yml", and the working-tree copy does not resolve: ..., or, on a GitLab whose lint response does not list the files it read, ... the Lint API did not report which files it read, so its verdict may rest on the default branch's copy.
Cause: the include’s local: location holds a $VAR glci cannot expand, so only GitLab can name the file, and glci cannot send your copy of it in its place: GitLab reads it from the project’s default branch. Your working-tree copy does not parse, is missing, or otherwise does not resolve. GitLab’s verdict was on its own copy, not yours, so glci does not report it as a pass. The same check covers an entry whose rules: glci leaves for GitLab to decide: rules that reference a masked variable, rules glci cannot evaluate (regexp: in exists:/changes:, project:/ref: in exists:) and rules glci’s checker refuses. Every other include rule is decided by glci, against the simulated context, before it sends anything. For such an entry the error reads include local "child.yml" is under rules: the Lint API's verdict rests on the default branch's copy, and the working-tree copy does not resolve: ..., or, when the response does not list the files GitLab read, include local "child.yml" is under rules: the working-tree copy does not resolve: ...; the Lint API did not report which files it read, so its verdict may rest on the default branch's copy.
Fix: fix the working-tree file; the error ends with what is wrong with it, and glci merged reports the same file. Or supply the variable locally (--env, .glci.env), so glci expands the location and sends your copy. When GitLab reads such a file and your copy resolves, glci warns instead (include local "child.yml" is under rules: GitLab read it from the default branch, ...): the jobs from that file and the verdict on it are GitLab’s copy’s, so unset GLCI_PREFER_API to use yours. See local files are always the working tree’s.
include: project: fails instead of being skipped#
What you see: project include "my/group" file "ci/child.txt": path must end in .yml or .yaml for an include: project:, even with no GitLab token configured. glci used to print skipping project include ...: no GitLab token configured and carry on.
Cause: GitLab validates an include’s location before it looks at its content or at your access to it, so the extension is wrong whether or not the file could have been fetched.
Fix: rename the file. A token is not the problem here — setting GITLAB_TOKEN will not clear this message, and the same config fails on GitLab.
A component version selector with ~ is rejected#
What you see: component include "gitlab.com/org/proj/comp@~2": version selector "~2" is not valid on GitLab; use "@2" instead, on a config glci accepted before.
Cause: glci used to resolve @~N and @~N.M itself. GitLab does not — ~latest is the only version it spells with a tilde, and anything else is matched as a literal ref, so @~2 fails there with content not found. Resolving it locally hid that until push.
Fix: drop the tilde. @2 and @2.3 are the partial-version selectors GitLab recognises, and they mean what @~2 and @~2.3 used to mean here. @~latest is unchanged.
An unknown interpolation is reported for component.reference, name, sha or version#
What you see: a parse aborts with unknown interpolation provided: `reference` in `component.reference` (or the same for name, sha or version), naming the include the file came from.
Cause: $[[ component.<key> ]] reads GitLab’s component context, and a file only gets a key from it when two things are true: its spec: header lists that key under component: (the header being the first document of a multi-document file), and it was reached through an include: component: entry. A .gitlab-ci.yml, or a file pulled in by remote:, template: or project:, has no component context at all, and a header that lists other keys (component: [reference] for a file that reads component.version) does not make this one available. A key other than the four GitLab defines, such as component.project, is never available. glci used to substitute reference regardless, which meant a config GitLab rejects passed locally.
Fix: use the expression only inside a component, add the key to that component’s spec: component: list, and keep it out of the spec: header itself, where GitLab never interpolates it. A component’s nested local: includes inherit its context and may use the expressions too; a nested project:, remote: or template: include cannot. See component includes.
An include: template: fails, or glci says it is read from gitlab.com#
What you see: a parse that includes one of GitLab’s bundled templates, directly or from inside a component or another included file, fails with template include "Jobs/Multi-Container-Scanning.latest.gitlab-ci.yml": the instance did not serve it (...), and neither did upstream: .... Or it succeeds and warns once: template include "..." is read from https://gitlab.com/gitlab-org/gitlab/-/raw/v17.5.0-ee/lib/gitlab/ci/templates, as https://<instance> did not serve it (...); so is any other template it does not serve. When glci could not learn the instance’s release, the URL names master instead and the warning goes on: . That is master, which may differ from the templates https://<instance> runs: <why>; <what to do>. What to do is set [includes] templates_url in ~/.glci/config.toml to read them from elsewhere, preceded by give glci a token that can read it (a personal, project or group access token with read_api; a CI job token cannot), or when a token would have helped. The warning goes to stderr, prefixed glci:, on a CLI parse and to the daemon log, prefixed daemon:, on glci run. It is informational. Older glci versions failed instead with yaml: line 3: mapping values are not allowed in this context, which named no file you wrote.
Cause: GitLab reads template: files from its own installation. glci has none to read, so it fetches the raw file from the gitlab-org/gitlab project. It reads the copy that matches the release the instance runs: it reads the instance’s version (GET /api/v4/version) and the matching tag of gitlab-org/gitlab, described below. It asks the configured instance first, which serves that copy when it mirrors the project, and gitlab.com otherwise; gitlab.com itself runs master. Most self-managed instances answer with a 404, a 401/403, or a redirect to their sign-in page. On any such failure, or when the instance cannot be reached, glci reads the template from gitlab.com instead, at the same tag, so it gets the templates that release bundles rather than ones changed since. Reading the version needs a token with read_api (a personal, project or group access token; a CI job token is refused), and the tag is looked up on gitlab.com. Both editions read the -ee tag, which bundles the same templates: 17.5.0-ee and 17.5.0 read v17.5.0-ee, 17.5.0-rc42-ee reads v17.5.0-rc42-ee. A development build (17.6.0-pre) reads master, which it runs. glci also reads master when it has no token, cannot read the version, the version names no release, or gitlab.com has no such tag, and then the warning ends with That is master, ..., the reason, and what to do about it. A CI job token is never sent for the version, since GitLab refuses it. A copy read at master because the version or the tag could not be read this time (a 5xx, a timeout) is not cached, so the next parse tries again. After an answer other than a 404, or when its version cannot be reached (no connection, a timeout, or a TLS handshake that fails), glci stops asking the instance for templates for the rest of the parse; when gitlab.com cannot be reached for the tag, the read fails at once with ... and upstream could not be reached: .... The error above means gitlab.com could not be reached either, for example offline or behind a proxy.
Any include read answered with a web page fails with got an HTML page from <url> (a sign-in page?) and is never cached. That covers a remote: URL that redirects to a login page, too. Older versions parsed the sign-in page as YAML and cached it, so ~/.glci/cache/includes may still hold one; glci now reads past such an entry.
Fix: let glci reach gitlab.com, with a read_api token so it reads your release’s templates rather than master’s. On a network that cannot reach gitlab.com, set [includes] templates_url in ~/.glci/config.toml to a copy of the templates you host. glci then reads every template from there and nowhere else: a template the copy lacks fails with template include "...": [includes] templates_url did not serve it: ..., with no fallback. Or mirror gitlab-org/gitlab, with its tags, on your instance under that path. Either must be readable without signing in, since glci sends no token with a template read. A template: must end in .gitlab-ci.yml, as on GitLab: Template file `Foo.yml` is not a valid location!.
A component version selector resolves locally but fails on GitLab#
What you see: @~latest or @2 resolves under glci, and the same pipeline on GitLab reports content not found for the component.
Cause: GitLab only accepts a selector for a component published to the CI/CD Catalog. glci resolves against the project’s published releases instead, because the catalog version list is not exposed by the REST API — so a project that has releases but was never published as a catalog resource resolves here and is refused there.
Fix: publish the component project to the CI/CD Catalog, or pin an exact version such as @2.3.7, which needs no catalog entry on either side.
CI configuration errors#
A script: line contains ": " and is rejected#
What you see: CI configuration is invalid: jobs:<name>:script config should be a string or a nested array of strings up to 10 levels deep, for a script line that looks perfectly ordinary:
job:
script:
- curl -H "Authorization: Bearer $TOKEN" https://example.com
- echo "Error: deployment failed"
Cause: this is a YAML rule, not a glci one. A colon followed by a space is the block-mapping indicator, and it is not allowed inside a plain (unquoted) scalar — so YAML reads those two entries as mappings rather than strings:
{'curl -H "Authorization': 'Bearer $TOKEN" https://example.com'}
{'echo "Error': 'deployment failed"'}
The double quotes in the line quote nothing, because they are not the first character of the scalar. GitLab refuses the whole file for this, so glci lint reports it too. Earlier versions accepted the file and dropped the entry without a word, so the command never ran and the job still reported success.
Fix: quote the whole entry, with the quote as the first character. Either form works, so pick whichever does not collide with the quoting inside the command:
job:
script:
- 'curl -H "Authorization: Bearer $TOKEN" https://example.com'
- "echo 'Error: deployment failed'"
Two things that are not the problem:
- A colon with no space after it is fine.
echo "ratio 1:2"needs no quoting —1:2is not a mapping indicator. - An anchor alias is fine.
- *shared_stepsexpands to a nested list, which GitLab flattens rather than rejecting, up to ten levels deep — unless the anchor is itself a!reference, which GitLab cannot read through an alias (see below).
The same rule covers before_script:, after_script:, default:before_script, default:after_script, services:command: and hooks:pre_get_sources_script — GitLab validates all of them with the same Entry::Commands rule, and so does glci. The message names the exact entry, so default:before_script config should be… means the default: block rather than any one job.
This is reported by glci lint, not enforced by glci run. Like every other config diagnostic glci produces, it does not stop a run today: a pipeline started without linting first still executes the job with the line missing, and still passes. On GitLab the same file is refused at pipeline creation and nothing runs at all. Lint a config you have just edited before you run it.
A config is refused for its YAML alone#
What you see: the parse fails — for glci lint, glci jobs and glci run alike — with one of:
line N: !reference [".tmpl", 1] is not valid: a !reference must be a non-empty list of stringsline N: the alias *ref names a !reference, which GitLab cannot read through an alias (An alias referenced an unknown anchor: ref)line N: a !reference is not valid as a merge (<<:) source,... as a mapping key, or... as the document rootline N: the document root must be a mapping (GitLab: Invalid configuration format)include: Each include must be a hash or a string, not ...yaml: anchor 'a' value contains itself (GitLab: The parsed YAML is too big),yaml: document contains excessive aliasing, oryaml: exceeded max depth of 10000
Cause: GitLab reads a !reference only as a non-empty list whose every segment is a string, and refuses the file otherwise. Its YAML reader is YAML 1.1, so a segment it reads as another type counts: an unquoted number (1, 1.5), null or ~, a date, and yes/no/on/off/true/false, which are booleans there. A nested list or mapping as a segment, !reference [], !reference .tmpl without the brackets, and !reference {...} are refused the same way. GitLab also cannot read a !reference through a YAML alias — script: *ref where &ref anchors a !reference — and has no place for one as a <<: merge source, a mapping key, or a whole document. (In a spec: header, whose tags GitLab never resolves, only the alias and the merge source are refused.)
Every document GitLab loads must be a mapping; an empty one — nothing, null, false, a blank string, [] or {} — is dropped, as on GitLab. GitLab loads the first three documents of a file (a leading --- counts as one), even those it then does not use, so a syntax error or a list there refuses the file; a !reference in a document it does not use is never resolved, and a document after the third, or after a ... end marker, is never read (see Jobs in a later YAML document are missing). An include: entry must be a string or a mapping; a !reference, a number, a boolean (an unquoted yes, on or true) or a list is refused with GitLab’s own words, and a null entry is skipped. The last three messages are the alias guards: an anchor whose value holds an alias to itself (.a: &a {b: *a}), aliases or merge keys that expand a document many times over, and alias chains nested deeper than a YAML file can be. They used to crash the parser — in the daemon, along with every running pipeline. Unlike the refusals above they are ordinary parse errors, so the other route is still tried, and refuses the file the same way. In an included file each names the include; parsing spec.inputs names only a fault in that file’s spec: header. A merge key aliasing its own anchor, or an anchor around it, is no such loop: GitLab merges the keys that mapping holds by then, so .a: &a {x: 1, <<: *a} is {x: 1} and .a: &a {b: {<<: *a}, x: 1} gives b nothing, and glci reads it the same way.
glci checks the !references and the document roots of the root file and its local includes on both parse routes, before anything is sent to the CI Lint API, and a file fetched from elsewhere when it is loaded. The include: entries are checked by the offline parser; under GLCI_PREFER_API=1 such an entry goes to GitLab, which refuses it, and the error then carries both reasons. A refusal is not retried on the other route, since it would only be refused again. A file its include rules: drop is never read, so it is never refused.
Fix: quote any segment that is a number, null/~, a date, or one of yes/no/on/off/true/false (!reference [.tmpl, "1"], !reference [.flags, "on"]); write the reference out where the alias stands (an alias to a mapping or list that contains a !reference is fine); use extends: rather than <<: !reference [...] to inherit a template’s keys; and turn a document that is a bare list or string into a mapping.
Jobs in a later YAML document are missing#
What you see: after upgrading, glci lint, glci jobs and glci run plan fewer jobs for a file split into YAML documents with ---, glci merged stops printing the later ones, and a job defined in two documents runs the first definition.
Cause: GitLab reads at most two documents of a CI file: a spec: header and the one content document after it. Without a header it reads the first document and ignores the rest. With one, it reads the last of the first three (a leading --- counts as the first), so spec: --- mid: --- job: gives job and nothing after it is read. glci used to merge every document into one pipeline, so jobs after a --- ran locally and never on GitLab, and a key a later document redefined won. Included files are read the same way.
Fix: keep a file to a spec: header and one document of jobs, and move anything else into its own file and include: it.
yes, no, on or off is now refused, or reads as a boolean#
What you see: after upgrading, glci lint fails and glci run refuses to start, on a pipeline that ran locally before, with one of:
jobs:<name> allow failure should be a hash or a boolean value, orjobs:<name> allow failure should be a boolean valuefor a trigger jobjobs:<name>:interruptible config should be a boolean value, ordefault:interruptible config should be a boolean valuejobs:<name>:rules:rule allow failure should be a boolean value, or... interruptible should be a boolean value(workflow:rules:rule ...for a workflow rule)jobs:<name>:parallel:matrix:variables config should be a hash of key value pairs, value can be an array, for a matrix value writtenyesoroninput "<name>" has unknown type "true", for an input’stype: yesortype: true!reference [".tmpl", "allow_failure"] could not be found, for a reference to a key that holdsnooroff, which GitLab treats as missingjobs:<name>:needs:need optional should be a boolean value(or... need artifacts ..., andjobs:<name>:rules:rule:needs:need ...orworkflow:rules:rule:needs:need ...for a rule’sneeds:),jobs:<name>:trigger:forward yaml variables should be a boolean value(orpipeline variables, andjobs:<name>:trigger:forward config contains unknown keys: <key>), orjobs:<name>:pages config should be a hash or a boolean value, for a quoted"true"or"yes"where one of those booleans belongs. glci used to read it as the keyword’s default:optional: "true"made a required need,yaml_variables: "false"still forwarded the job’s variables, andpages: "true"was no Pages job. The other boolean keywords were already refused the same way:jobs:<name>:inherit:default should be a bool or array of strings,jobs:<name>:artifacts untracked should be a boolean value,jobs:<name>:cache:untracked config should be a boolean valueandjobs:<name>:variables:<var> config expand should be a boolean value.jobs:<name>:needs config can not be an empty Hash, forneeds: {}. Aneeds:written as a single mapping (needs: {job: build}) is one need, as on GitLab: the job now waits onbuildand takes its artifacts, where glci used to ignore it and run the job by stagejobs:<name>:pages path prefix should be a string(orpublish),jobs:<name>:pages expire in should be a duration, orjobs:<name>:pages config contains unknown keys: <key>, for apages:mapping with a boolean or number where a string belongs (pages: {publish: on}) or a key it does not takejobs:<name>:script config should be a string or a nested array of strings up to 10 levels deep(orbefore_script,after_script), for a script line writtenyesorno, andstages config should be an array of strings or a nested array of strings up to 10 levels deep, for a stage namedonjobs:<name>:stage config should be a string,jobs:<name>:timeout config should be a duration(with... should not exceed the limit),jobs:<name>:tags config should be an array of strings(default:timeoutanddefault:tagsalike),jobs:<name> dependencies should be an array of strings,jobs:<name>:needs:need has an unsupported type,jobs:<name>:trigger strategy should be a string,jobs:<name>:trigger has to be either a string or a hash(fortrigger: on),jobs:<name>:trigger project should be a string(orbranch), orextends target "true" not found, for a boolean such asstage: onwhere a string belongs. Most of these were refused before in glci’s own words (references stage "on" which is not defined); a number there (timeout: 3600,stage: 1), a boolean intags:, or a single string where a list belongs (tags: docker,dependencies: build) used to be accepted, and GitLab refuses each.jobs:<name>:image config should be a hash or a string(with... name should be a stringand... name can't be blank),jobs:<name>:services:service ...alike,jobs:<name>:environment config should be a hash or a string,jobs:<name>:cache:key should be a hash, a string or a symbol,jobs:<name>:cache:paths config should be an array of strings,jobs:<name>:artifacts paths should be an array of strings,jobs:<name>:rules:rule:changes config should be an array of strings(existsalike,workflow:rules:rule:...for a workflow rule),jobs:<name>:only config should be an array of strings or regular expressions using re2 syntax(orexcept),retry when should be an array of strings or a string,variables:<name> config options should be an array of strings,variables:<name> config description must be an alphanumeric string,jobs:<name> resource group should be a stringorjobs:<name>:coverage config must be a regular expression with re2 syntax, for a boolean such asimage: onorcache: key: onwhere a string belongs (default:image,default:cache:keyand the top-levelimage,servicesandcachealike). These used to be dropped:image: onran the job in the default image. Aworkflow: name: ongetsworkflow name should be a string, in glci’s words: GitLab passes its validation and then fails to create the pipeline withUndefined error.
Those checks also refuse some string values GitLab refuses; see A keyword value GitLab refuses is now refused.
A boolean include: entry (include: [yes]) was refused before too; it now gets GitLab’s message, include: Each include must be a hash or a string, not true.
Or nothing fails and a value has changed: a variable written DEBUG: on now holds true; inherit: default: no, needs: artifacts: no and a variable’s expand: off now take effect. The other way, some files GitLab accepts are accepted now: allow_failure: tRUE, a boolean input’s default: on, and flag: on for a boolean input in an include’s inputs: (an --inputs-file reads it the same way).
Cause: GitLab’s YAML reader, Psych, reads an unquoted yes, no, on, off, true or false, in any letter case, as a boolean, and a quoted one as a string. glci used to read the unquoted words as strings and to accept the quoted ones where a boolean belongs, so a file could run here that GitLab refuses or reads differently.
Fix: where a boolean is meant, write it unquoted (allow_failure: true reads best). Where the word is meant, quote it: DEBUG: "on", FLAG: ["yes", "no"].
A job or variable named yes, no, on or off is refused#
What you see: glci lint fails and glci run refuses to start with one of:
jobs:true name should be a symbol, for a job or trigger job writtenyes:,on:ortrue:; one writtenno:,off:orfalse:getsjobs:job name can't be blankandjobs:job name should be a symbol(jobs:bridge ...for a trigger job)variables:true key must be an alphanumeric string, orjobs:<name>:variables:true ...,jobs:<name>:rules:rule:variables:true ...,workflow:rules:rule:variables:true ...,jobs:<name>:services:service:variables:true ...(default:services:...and the top-levelservices:...alike); a variable writtenno:,off:orfalse:is namedsimple variable(orcomplex variablefor one with a mapping or no value) in its placejobs:<name>:parallel:matrix:variables config should be a hash of key value pairs, value can be an array, for a matrix variable named that wayheader:spec:inputs:true key must be an alphanumeric string(header:spec:inputs:input ...for a false one), for aspec: inputs:entry, andjobs:<name>:inputs:true ...(jobs:<name>:inputs:job input ...) for a job’sinputs:entry
Cause: GitLab’s YAML reader reads an unquoted yes, no, on, off, true or false, in any letter case, as a boolean in a mapping key too, and a boolean is neither a job name nor a variable or input name. glci used to keep the key as written, so a file GitLab refuses linted clean and ran. A variable a job gets through extends: or !reference counts, as it does on GitLab. As on GitLab, a job with a bad when:, or a rule or service that glci refuses for its own keys or values, reports that alone, without checking the names under it. A boolean key under a hidden key (.template:) that no job uses is not checked, and as an id_tokens: name or any other key GitLab takes it is named true or false, as on GitLab.
Fix: quote the name: "yes":, "ON": x.
A value like 12:30, 1,000, 0755 or 0x1F now reads as a number#
What you see: after upgrading, a variable holds a different value with no error: TIME: 12:30 gives 45000, VER: 1,2 gives 12, MODE: 0755 gives 493, HEX: 0x1F gives 31. Or glci lint fails on a pipeline that ran locally before:
jobs:<name>:parallel should be an integer or a hash, for a quoted count such asparallel: "1:2"orparallel: "0x2"retry config has to be either an integer or a hash, for a quotedretry: "1:0", orretry max is not a numberformax: "1:0"jobs:<name>:timeout config should be a duration, fortimeout: 1:30(orstart_in: 1:30), which glci used to run as 90 seconds
The other way, retry: 0b1 and parallel: 0x2, which glci used to refuse, are now accepted.
Cause: GitLab’s YAML reader, Psych, reads YAML 1.1 integers: an unquoted hexadecimal (0x1F), binary (0b11) or leading-zero octal (010, which is 8) number, one with _ or , between its digits, and one with colons, which Psych reads by its own base-60 formula: a:b is a×3600 + b×60 and a:b:c is a×3600 + b×60 + c. A quoted one is a string. glci used to read most of them as strings and 010 as 10.
Fix: where the text is meant, quote it: TIME: "12:30", MODE: "0755", timeout: "1h 30m". Where a count is meant, write it unquoted.
A keyword value GitLab refuses is now refused#
What you see: after upgrading, glci lint fails and glci run refuses to start on a pipeline that ran locally before, with one of:
jobs:<name>:environment name can contain only letters, digits, '-', '_', '/', '$', '{', '}', '.', and spaces, but it cannot start or end with '/', for an environment name such asa:borreview/jobs:<name>:only has to be either an array of conditions or a hash, for a single ref name (only: main)jobs:<name>:cache:key config cannot contain the "/" character, or... cannot be "." or ".."jobs:<name>:cache:key:files config requires at least 1 item, or... has too many items (maximum is 2)jobs:<name>:environment action should be start, stop, prepare, verify, or access,jobs:<name>:cache when should be one of: on_success, on_failure, always,jobs:<name>:artifacts access should be one of: none, developer, maintainer, all,jobs:<name>:image:pull_policy config is not included in the list, orjobs:<name>:cache policy should be a variable or one of: pull-push, push, pull, for a value outside GitLab’s setjobs:<name> start in should be a duration, for awhen: delayedjob with nostart_in:, andjobs:<name> start in must be blank, for astart_in:on a job that is not delayed or hasrules:(a rule takes its ownstart_in:)jobs:<name> config key may not be used with `rules`: only, start_in, foronly:,except:orstart_in:besiderules:retry config must be less than or equal to 2(orretry max ...,... must be greater than or equal to 0,retry max is not a number), for a retry count outside 0 to 2jobs:<name>:only config can't be blank, foronly: {}, andjobs:<name>:coverage config must be a regular expression with re2 syntax, for acoverage:not written as/regex/jobs:<name>:rules:rule config contains unknown keys: <key>, for a key the rule does not take (workflow:rules take nointerruptible:)variables:<name> config value must be present in options, orjobs:<name>:variables:<name> config uses invalid data keys: descriptionfor a job’s variable withdescription:oroptions:, which only a top-level variable takesjobs:<name>:rules:rule:exists config has too many entries (maximum 50)jobs:<name> config should contain either a trigger or a needs:pipeline, beside another error on a trigger job (when: delayed, a non-booleanallow_failure:,resource_group: on)
Cause: glci now runs GitLab’s whole validator for each keyword it type-checks (image:, services:, environment:, cache:, artifacts:, only:/except:, variables:, a rule’s changes:/exists:), and those validators check some values as well as their type. GitLab refuses each of these files on push. A service that is itself invalid (no name:) is now reported as such (jobs:<name>:services:service name can't be blank) rather than for its command:, as on GitLab.
Fix: change the value to one GitLab accepts: write only: as a list (only: [main]), keep / out of a cache key (key: $CI_COMMIT_REF_SLUG is the usual choice), give a delayed job a start_in:, and move a variable’s description: and options: to the top-level variables:.
A top-level key that is no job is now refused#
What you see: after upgrading, glci lint fails and glci run refuses to start on a pipeline that ran locally before, with one of:
jobs <name> config should implement the script:, run:, or trigger: keyword, for a top-level key that is not a global keyword and has none ofscript:,run:,trigger:orneeds:- a misspeltscript:, a job left empty, or aspec:in a file with no---after itjobs:.<name> config can't be blank, for a hidden key holding nothing (.base:,.base: {},.base: [],.base: false), once includes and!referenceare resolvedjobs:<name> config should contain either a trigger or a needs:pipeline, for a key withneeds:but noscript:orrun:, or withtrigger:set to nothing, unless itsneeds:holds apipeline:need (needs: {pipeline: other/project}, alone or in the list); aneeds:with any invalid entry counts as holding none, as on GitLabjobs:<name> config should contain at most one bridge need, for such a key with two or morepipeline:needs
Cause: GitLab reads every top-level key that is not a global keyword as a job, a trigger job or a hidden key, and refuses the file when one is none of them. glci used to drop such a key without a word, so the rest of the pipeline ran locally and the push failed. As on GitLab, the first message hides every job error beside it, the ones glci finds after the parse as well (parallel:, rules: if:, needs:, stage:), since GitLab then builds no job at all; errors in the global keywords, such as stages:, variables:, default: and workflow:, are still reported.
With an include skipped because no GitLab token is configured, a key the skipped file may complete is not refused - one holding a mapping, which an included key of the same name is merged under, or a !reference into that file - and neither is a trigger job with no trigger:, which the file may turn into a job: glci lint says the configuration could not be fully verified and lists it, as it lists a missing extends: target.
A spec: is a header only when a --- line and the pipeline follow it. Without one, GitLab reads it as an ordinary key, so the file is refused, root and included alike, unless it is a job (spec: with a script:, as in many Ruby projects), which runs. A spec: job after a header is a job too, and so is one in any file of a wildcard local: or of a project: with a file: list, each of which is read on its own, against its own header. glci used to fill such a file’s $[[ inputs.X ]] blocks from the defaults its spec: declared, and dropped a job named spec after a header or among the files of a wildcard or a file: list.
Fix: give the job a script:, run: or trigger:, delete the empty hidden key, or put --- after the spec: block.
Rule evaluation issues#
The pipeline did not run#
What you see: run, jobs, show or variables fails with
the pipeline did not run: no workflow:rules rule matched under CI_PIPELINE_SOURCE=push, CI_COMMIT_BRANCH=feature, CI_DEFAULT_BRANCH=main [rule 1 if: $CI_MERGE_REQUEST_IID → if: evaluated to false; rule 2 if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH → if: evaluated to false] — GitLab would not have created this pipeline either; no --context given, so glci assumed branch=feature; pass --context merge_request to simulate a merge request pipeline, or review the workflow:rules configuration
Cause: the project’s workflow: rules: did not accept the simulated context, so there is no pipeline to plan — the same refusal GitLab answers a push with. Without --context, glci simulates the pipeline that pushing HEAD would create: a branch pipeline for the checked-out branch (CI_PIPELINE_SOURCE=push, CI_COMMIT_BRANCH set, no CI_MERGE_REQUEST_*). A workflow that accepts only merge requests and the default branch rejects a feature branch under that context, exactly as GitLab does on push when no merge request is open for the branch. When glci picked the context itself, the message says which one it assumed and suggests the likelier alternative; with an explicit --context the tail reads simulate another context with --context instead.
Fix: run with the context the pipeline expects, and check the bracketed rule list in the message to see which condition failed:
glci run --context merge_request
glci run --context branch=main
glci run --context tag=v1.0
To keep from typing it every time, name the context in a preset — a [contexts.<name>] entry in the global ~/.glci/config.toml you pass as --context <name>, or, in the project .glciconfig.toml, a context = (e.g. context = "merge_request") inside [pipelines.<name>] that applies when you run with --pipeline <name>. See workflow rules.
Jobs unexpectedly skipped#
What you see: no jobs to run: requested [job-name] but none matched after rules evaluation or a job you expected is missing from glci show.
Cause: Rules evaluated to when: never in the simulated context. Without --context, glci simulates the pipeline that pushing HEAD would create: usually branch=<current branch>, or tag=<t> on a detached HEAD a tag points at - see Default context. glci show, jobs, variables and run print the context they chose on stderr, e.g. glci: no --context given, assuming branch=main (checked-out branch).
A job that declares needs: optional: true on a rules-excluded job is no longer one of the reasons — that edge is dropped and the dependent runs, as Optional needs describes.
Debugging steps:
# See which jobs are included for the checked-out branch
glci show
# Compare with a different context
glci show --context merge_request
glci show --context branch=main
glci show --context tag=v1.0
# Check a specific job
glci jobs # lists all jobs and their when: status
Common reasons jobs are excluded:
| Rule | Why it doesn’t match | Fix |
|---|---|---|
if: $CI_PIPELINE_SOURCE == "merge_request_event" or if: $CI_MERGE_REQUEST_IID | The default context is a branch push, not a merge request | Use --context merge_request |
if: $CI_PIPELINE_SOURCE == "push" | Context is merge_request (from --context, a preset, --mr-source/--mr-target, or the fallback when HEAD is on no branch or tag) | Use --context branch=main |
if: $CI_COMMIT_TAG | No tag in context | Use --context tag=v1.0 |
if: $CI_COMMIT_BRANCH == "main" | Your branch isn’t main | Use --context branch=main |
changes: [path/**/*] | The push’s diff does not touch the path. A branch push compares only the commits your remote-tracking branch (origin/<branch>) lacks, plus uncommitted changes under --dirty | Run git fetch if origin/<branch> is stale. Use --context merge_request to compare against the target branch, or compare_to:. With no diff (a new branch, nothing to push, a tag) changes: matches everything, so then check other clauses. See The changes diff |
changes: [docs/**] or exists: [docs/**] | A trailing ** is a single *, as on GitLab, so it matches only the files directly in docs/, not docs/guide/intro.md | Write docs/**/* to match everything under docs/. See glob behavior |
changes: [] or exists: [] | An empty pattern list never matches, as on GitLab, even where no diff makes every other changes: match | List the paths, or drop the clause |
exists: [file.txt] | File is gitignored, or doesn’t exist | exists: matches your non-ignored files (tracked + untracked, minus .gitignore). Un-ignore the file or create it; gitignored build output never matches |
if: '!$FOO == "bar"' | ! binds to $FOO, not to the comparison, so this is (!$FOO) == "bar" and the left side is "true"/"false" | Write !($FOO == "bar") to negate the comparison. See operators and operands |
An if: expression that does not parse is no longer one of the reasons — glci rejects that config outright, the way GitLab does, rather than treating the rule as false and dropping the job. glci lint names the job and exits non-zero, and glci run refuses to start. The same check applies to a child or cross-project pipeline’s config, where it fails the trigger job with the reason in that job’s log and runs none of the downstream pipeline’s jobs, as GitLab creates none of them. The downstream pipeline is still recorded in glci history, failed with failure reason config_error and its errors (see glci history show <id>), as GitLab records it. It also applies when the daemon resumes a pipeline after a crash: if the CI config (or a file it includes) was edited in between into one GitLab rejects, the resume is refused and the pipeline is marked failed, exactly as when the edited file no longer parses. Nothing will run those jobs now, so every job that had not already finished is marked failed with the pipeline and the run gets a finish time: glci history shows it as a completed failure rather than an open one, and glci show <id> no longer lists its jobs as pending. Long conditions written as a YAML block scalar (if: >, if: >-, if: |) parse normally; whitespace between tokens, newlines included, is ignored – except inside a quoted string, which cannot span a newline.
A job needs a job that “does not exist in the pipeline”#
What you see: glci run, glci show or glci jobs stops before anything runs or is drawn, and exits 1, as glci lint does for an invalid config (under --json, run emits no pipeline_done, since no pipeline was created):
CI configuration is invalid:
'unit_tests' job needs 'compile' job, but 'compile' does not exist in the pipeline. This might be because of the only, except, or rules keywords. To need a job that sometimes does not exist in the pipeline, use needs:optional.
The TUI draws the CI file unplanned instead, with the same reason under the title. glci lint calls the same file valid.
Cause: unit_tests needs compile without optional: true, and in the context you are simulating compile’s rules: leave it out of the pipeline. GitLab refuses to create that pipeline, with this message, so glci refuses it too rather than start a run that could never finish. It is a property of the context rather than of the file, which is why glci lint, which evaluates no job rules, passes it. Every job in the pipeline is checked, so selecting other jobs with --job or --stage does not get around it.
Fix: if the need is genuinely conditional, mark it optional: true (needs: [{job: compile, optional: true}]): the edge is then dropped whenever compile is not in the pipeline, as on GitLab (see Optional needs). If compile should be in the pipeline, check the context: glci show --context tag=v1.0 (or merge_request, branch=main) shows whether the pipeline you meant to simulate keeps it, and Jobs unexpectedly skipped lists the usual reasons a rule does not match. Otherwise give the dependent the same rules: as compile, so neither is in the pipeline without the other.
rules:changes:compare_to is not a valid ref#
What you see: glci run, glci show or glci jobs stops before anything runs, with:
CI configuration is invalid:
Failed to parse rule for unit_tests: rules:changes:compare_to is not a valid ref
or, for a rule on an include: entry, CI configuration is invalid: parsing CI config: resolving includes: include:rules:changes:compare_to is not a valid ref. For a workflow: rule the pipeline does not run, and the rejection lists the refusal as that rule’s reason: the pipeline did not run: no workflow:rules rule matched under ... [rule 1 changes: → rules:changes:compare_to is not a valid ref]. Evaluation stops there, so later rules are not tried.
Cause: a changes: compare_to: names no commit in your repository, after its variables are expanded. The ref is checked only when GitLab reaches that changes:: a rule whose if: is false, or one after the rule that decided, is never checked, so the refusal can depend on the context. GitLab refuses the pipeline with the same message (a workflow: rule just filters it out there), so glci does too. A job alone in its stage is the exception: GitLab leaves it out and creates the pipeline without it, and so does glci. glci accepts a branch or tag (bare or as refs/heads/.../refs/tags/...), a SHA, HEAD (the default branch, as on GitLab), and a branch that exists locally only as origin/<branch>. It refuses what only a clone can resolve, since GitLab’s repository has no such refs: origin/main written out, main@{1}, @{u}, FETCH_HEAD. An undefined $VAR in the ref stays literal, as on GitLab, and names no commit. In a shallow or single-branch clone glci cannot tell a missing branch from an unfetched one, so it warns and lets changes: match instead of refusing.
Fix: fetch the branch the rule compares against (git fetch origin <branch>), or correct the ref. If the ref comes from a variable, check that the variable is defined in the context you simulate (glci variables <job>).
Pipeline fails with “pipeline cannot finish”#
What you see: the run ends with ✗ Pipeline FAILED and exit code 1, and a job that never started is reported failed, with a line like [test] ERROR: job "test" can never run: it needs "compile", which is not in the pipeline printed once everything else has finished. glci log shows the same line for that job, and under --json the pipeline_done event’s error reads pipeline cannot finish: job "test" needs "compile", which is not in the pipeline, counting any further jobs that only wait on it. Older glci versions reported such a job as skipped and the pipeline as passed, exiting 0.
Cause: the job waits on something that can never finish, so glci gave up on it once nothing else could run. The reason names what it waits on:
needs "<job>", which is not in the pipeline: theneeds:target is not in the pipeline, and nothing refused the pipeline before it started. A target itsrules:leave out is refused up front instead (see A job needs a job that “does not exist in the pipeline”), so what is left is rarer: a target in a stage thatstages:does not list, whichglci lintreports, or a need that picks shards withparallel: matrix:whenrules:leave out a shard it did not pick, because glci waits on every shard of the target.waits on "<job>", which can never run: the job waits, throughneeds:or an earlier stage, on another job that can never run. Fix that one first.
Fix: declare the target’s stage in stages:, or, for a shard pick, mark the need optional: true, or make the target’s rules: keep every shard (a rule testing a matrix variable can leave some out), since glci waits on all of them. A job that only waits on a manual job nobody played is not part of this: it is skipped and the pipeline still passes.
Jobs unexpectedly included#
What you see: A job that should be skipped (e.g., deploy jobs) runs anyway.
Cause: The simulated context is not the one your real pipeline runs in - by default a push of the checked-out branch, while the real pipeline may be a merge request or run on another branch. Or rules: changes: matches everything because the push has no diff: the remote has no such branch, or already has HEAD (see changes: matches every job on a branch push).
Fix:
# Simulate the exact context you want
glci run --context branch=feature-x
# Skip specific jobs by name
glci run --skip "deploy*"
A rule testing for an unset variable started or stopped matching#
What you see: a job gated on $VAR == null, $VAR != null, $VAR == "" or $VAR != "" appears or disappears, with no change to the pipeline.
Cause: glci used to resolve an undefined variable to the empty string, and to read the bare word null as the null literal wherever it appeared. Both are now correct: an undefined variable is nil, a variable defined as empty is "", and nil equals nothing but nil. Seven comparisons reversed:
| expression | before | now | GitLab |
|---|---|---|---|
$UNSET == "" | true | false | false |
$UNSET != "" | false | true | true |
$EMPTY == null | true | false | false |
$EMPTY != null | false | true | true |
$UNSET == "null" (quoted) | true | false | false |
$VAR == null where VAR is the text null | true | false | false |
if: $VAR where VAR is the text null | false | true | true |
The common guard rules: [{ if: '$SOME_VAR != null' }], meaning “this variable was set at all, even to empty”, was inverted for any variable declared with an empty default — glci skipped jobs GitLab runs, and ran jobs GitLab skips, exiting 0 either way.
Fix: nothing, if the rule was written for GitLab’s semantics — it now behaves as it does upstream. If a rule was written against the old behaviour, != "" is the one to re-read: it is not a presence test. Use the bare $VAR for “set to something non-empty”, != null for “defined at all”.
glci variables <job> prints each condition with its operands expanded. It renders an unset variable and one defined empty identically, as (), so it will not by itself tell those two apart — check whether the name has a row in the variables table below the trace. That distinction now decides ==, != and bare truthiness as well as =~.
A rule using =~ started or stopped matching#
What you see: after upgrading, a job guarded by =~ or !~ is included where it used to be skipped, or skipped where it used to run — with no change to the pipeline.
Cause: the right-hand side of =~ is a regular expression only when it is written as one, /pattern/. Anything else is a substring test in which the right-hand side is the text being searched, and an unset right-hand side never matches at all. glci used to compile every right-hand side as a regex and match it against the left, so comparisons that did not use /pattern/ evaluated backwards, and an unset one became the empty pattern and matched everything.
Fix: decide which of the two the rule meant.
# A pattern: write it as one.
- if: '$CI_COMMIT_BRANCH =~ /^(main|release)$/'
# A membership test: the right-hand side is the haystack, which is what
# GitLab does — "main" occurs inside "main,release".
- if: '$CI_COMMIT_BRANCH =~ $BRANCHES'
# A presence test: the bare variable, for "set to something non-empty".
# Not `!= ""` — an undefined variable is nil, and nil != "" is true.
- if: '$DEPLOY_PATTERN'
A variable that is defined but empty is not the same as one that was never set: the first is searched and matches only an empty left-hand side, the second never matches. See the right-hand side of a match.
glci variables <job> prints each condition with its operands expanded, which shows which side held what. It renders an unset variable and one defined empty identically, as (), so it will not by itself tell those two apart — check whether the name has a row in the variables table below the trace.
A rule with a backslash in it is now invalid, or quietly matches differently#
What you see: after upgrading, a pipeline that linted clean is refused with jobs:<name>:rules:rule if invalid expression syntax – or it still lints clean, and a rule whose literal contains a backslash now matches the other way. The sharpest form of the second case is a when: never guard that stops firing, so a job it used to block starts running.
Cause: a quoted string in an if: expression is taken verbatim. There are no escape sequences, so a backslash is ordinary data. glci used to decode escapes; GitLab never has, so the two disagreed about what the literal even was, and this brings glci in line. Four shapes come out of it:
$FOO == "a\"b"– the literal ends at the escaped quote andb"is left over, which is refused.$A == "x\" && $B == "y"– the literal ends early too, but the leftover is a valid continuation, so it lints clean and quietly reads as$A == "x\"and$B == "y".$WORKDIR == "C:\\temp"– the literal is now the eight charactersC:\\temprather than the decodedC:\temp, so a guard written this way no longer matches. If it was awhen: neverrule, the job runs.$A == "x\" == "y"– the leftover begins with a comparison operator, and this is the one shape where glci is stricter than GitLab. GitLab lexes$A,==,x\,==,yand its parser builds the left-associative($A == 'x\') == 'y', which is valid configuration whose chained rule is constant (always false for==and=~, always true for!=and!~). glci does not chain comparisons, so it refuses a file GitLab accepts, with the same... if invalid expression syntaxas every other refusal (the parser’sunexpected trailing input: "== \"y\""appears in a rule trace, not in the lint verdict). A leftover beginning!=,=~or!~is refused the same way. Rewrite the rule rather than relying on either reading.
A literal that spans a newline is refused outright; that has its own entry directly below.
In the second and third cases the rule was already behaving this way on GitLab – a guard comparing against "C:\\temp" never fired there either, so the job was always running in real CI and only glci was blocking it. Check what the rule was meant to compare before assuming the old local result was the correct one.
Fix: stop escaping quotes and use the other quoting style instead; write a backslash as itself.
# Refused: the literal ends at \" and b" is left over.
- if: '$FOO == "a\"b"'
# Write the other quote around it.
- if: "$FOO == 'a\"b'"
# \n is two characters, not a newline, so this matches SEP: 'a\nb'.
# Keep the variable's own YAML single-quoted so YAML does not decode it either.
- if: '$SEP == "a\nb"'
# A backslash stands for itself: match WORKDIR: 'C:\temp' as it really
# is, rather than doubling it.
- if: '$WORKDIR == "C:\temp"'
A literal needing both kinds of quote cannot be written at all – that is true on GitLab too.
glci variables <job> prints each condition with its variables expanded, which tells you what the operands held. It renders the expression as you wrote it, so it will not show you where the literal actually ended – count from the opening quote to the next quote of the same kind, ignoring any backslash in between, and that is the string being compared.
Only glci lint, glci run and glci show refuse an invalid config. glci jobs and glci variables plan around it instead: the job disappears from the listing with a warning on stderr and the command still exits 0. So if a job goes missing after an upgrade, run glci lint to get the verdict rather than inferring one from an empty table.
A string literal in a rule spans a newline#
What you see: glci lint fails with jobs:<name>:rules:rule if invalid expression syntax and glci run refuses to start, on a pipeline that ran locally before the upgrade. The rule itself looks ordinary – the newline is inside a quoted string that was written across two lines of a YAML block scalar, which is easy to miss.
Cause: Lexeme::String’s pattern is built from ., and Ruby’s . does not match a newline, so a literal spanning one matches no lexeme at all and GitLab rejects the configuration. glci used to evaluate it instead, so the same file ran here and was refused there. This is the shape most likely to be in an existing pipeline already: the backslash shapes above need somebody to have deliberately written \" or \\, while a literal newline only needs a long condition broken across lines in a | block.
# Refused: the literal opens on one line and closes on the next, so the
# string itself contains the newline.
release:
script: ./deploy.sh
rules:
- if: |
$CI_COMMIT_MESSAGE == "release
candidate"
Fix: keep each literal on one line. Whitespace between tokens, newlines included, is still ignored, so a long condition can be broken anywhere outside the quotes:
- if: |
$CI_COMMIT_MESSAGE == "release candidate" &&
$CI_COMMIT_BRANCH == "main"
A folded scalar (if: >, if: >-) folds a single newline into a space rather than keeping it, so a literal broken across lines there is accepted and compares against release candidate with a space in it – not a syntax error, but not what was written either. A blank line inside a folded scalar does keep a newline, and is refused like the | case. A carriage return is ordinary data: Ruby’s . matches it, so it stays inside the string.
A rule using ${VAR} is now invalid#
What you see: after upgrading, glci lint fails with jobs:<name>:rules:rule if invalid expression syntax and glci run refuses to start, on a pipeline that ran locally before. The entry path names where the rule sits: workflow:rules:rule for a workflow rule, include:rule for a rule on a top-level include: entry (reported once, however many include rules are wrong, as GitLab stops at the first), jobs:<name>:trigger:include:include:rules:rule for a rule on a trigger job’s trigger: include: entry, and input "<name>" rule N: invalid if expression for a spec: inputs: rule. An include rule that is wrong in some other way – an unknown key, a job-only when: – is covered in an include rule is refused. glci show, glci jobs and glci variables do not refuse the file: they treat that one rule as not matching, warn on stderr (could not evaluate rule if: ...: unexpected '{' at position N: GitLab has no ${VAR} form) and go on to the job’s next rule, so the job is still listed if a later rule includes it. The lenient handling above is for job and workflow: rules only. An invalid include rule is refused by every command, because it decides which files make up the pipeline: a top-level one stops the parse while includes are resolved, so glci lint, merged, doctor, jobs, show, variables and run all report CI configuration is invalid: parsing CI config: resolving includes: include:rule if invalid expression syntax, and a trigger: include: one is listed under CI configuration is invalid: by glci lint, run, show, jobs and variables.
Cause: GitLab’s variable lexeme is /\$(?<name>\w+)/, and no lexeme matches {, so GitLab rejects the configuration outright. glci used to accept the braced form, so the same file ran here and was refused on push. It applies to job, workflow:, include:, trigger: include: and spec: inputs: rules alike. GitLab checks an include rule before deciding whether to include the file, so a bad one is refused whether or not it would have matched.
Fix: write the variable without braces.
# Refused, here and on GitLab.
- if: '${CI_COMMIT_BRANCH} == "main"'
# Accepted.
- if: '$CI_COMMIT_BRANCH == "main"'
A spec: inputs: rule sees no CI/CD variables, so there the braced name was almost certainly meant as another input: write $[[ inputs.NAME ]], not $NAME, which is always unset.
Only if: expressions are affected. ${VAR} in script:, variables: and include: paths (local:, project:, file: and so on) is expanded as before.
The same lexeme decides what counts as a variable name: \w in Ruby is ASCII-only, so a name is any run of A-Z, a-z, 0-9 and _ – $1FOO is a variable, while $ê is refused and $FOOê reads $FOO followed by a stray ê, which is refused too.
An include rule is refused#
What you see: an error naming an include rule, with GitLab’s message: include:rule when unknown value: on_success, include:rule config contains unknown keys: allow_failure, include:rules config should be an array, include:rule:changes should be an array or a hash. A rule on a top-level include: entry (nested includes too) stops the parse while includes are resolved, so glci lint, merged, doctor, jobs, show, variables and run all refuse the config with one line:
CI configuration is invalid: parsing CI config: resolving includes: include:rule when unknown value: manual
A rule on a trigger job’s trigger: include: entry is reported under jobs:<name>:trigger:include:include:rules:rule, in the indented CI configuration is invalid: list, by glci lint, run, show, jobs and variables.
Cause: an include rule is not a job rule. GitLab accepts only if, changes, exists and when in it, and when: may only be never or always – on_success, manual and delayed belong to jobs. rules: must be a non-empty list of mappings, and changes:/exists: must have the shape GitLab accepts. GitLab checks all of this before it decides whether to include the file, so it refuses the whole configuration even when the rule would not have matched, and glci does the same. include:rules:changes:compare_to is not a valid ref is different: it is raised only when the rule is evaluated and reaches that changes:; see rules:changes:compare_to is not a valid ref.
Fix: drop the job-only keys and values from the include rule. If you meant to gate the included jobs themselves, put the condition in their own rules:.
# Refused, here and on GitLab.
include:
- local: ci/deploy.yml
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: manual
# Accepted.
include:
- local: ci/deploy.yml
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
GitLab downcases these messages, so a key or value is echoed in lower case, and glci lists several unknown keys alphabetically where GitLab keeps their order in the file. A top-level include reports only the first bad rule; a trigger: include: entry reports every one.
Context simulation not matching real CI#
What you see: Jobs appear in glci show that don’t appear in the GitLab pipeline (or vice versa).
Cause: glci evaluates rules locally with the simulated context. Some differences from real CI:
$CI_PIPELINE_SOURCEis set topush(for branch/tag) ormerge_request_event(for merge_request context) — your real pipeline may have a different sourcerules: changes:reads what GitLab has from your local git: a branch push compares from your remote-tracking branch (as of your lastgit fetch), a merge request from your local copy of the target branch. See The changes diffrules: exists:evaluates your local working tree minus gitignored files (tracked + untracked), while GitLab evaluates the committed tree at the pipeline SHA — so uncommitted/untracked files satisfyexists:locally but won’t on GitLab until committed- Protected/unprotected branch distinctions are not enforced locally —
CI_COMMIT_REF_PROTECTEDand the twoCI_MERGE_REQUEST_*_BRANCH_PROTECTEDvariables are alwaysfalse
Fix: Use --context and --env together to match your real CI environment as closely as possible:
glci show --context merge_request --mr-source feature --mr-target main
Performance tips#
Slow image pulls#
The embedded registry acts as a pull-through cache – the first pull is slow but subsequent pulls are instant.
Slow startup due to secrets fetch#
Remote variable fetching adds latency to pipeline startup. If you don’t need remote secrets:
glci run --secrets none # skip all remote variable fetching
glci run --secrets project # skip group variables (slower due to pagination)
Reducing disk usage#
glci system df # check what glci is using
glci system cache clean # wipe CI cache
glci system prune # clean unused containers, networks, volumes
glci system prune --all # also remove registry data and history
Known limitations#
CI_JOB_TOKENis forwarded from the host’s GitLab token — permissions may differ from production. Use--no-tokento disable.include: project:andinclude: component:require a GitLab API token.local:works offline;remote:andtemplate:need network (see template includes). Component version selectors resolve against the project’s published releases:@~latesttakes the newest, and a partial version (@2,@2.3) the newest match, never a pre-release; one matching no release falls back to a tag or branch of that name.@~Nand@~N.Mare rejected, as on GitLab. GitLab selects from CI/CD Catalog versions rather than releases, so a selector against a project that has releases but is not a catalog resource resolves here and is refused there.- Local
include:paths resolve from the repository root (nearest.gitabove the CI file), matching GitLab — not from the CI file’s directory. Outside a git repository, resolution falls back to the CI file’s own directory, so a subdirectory CI file referencing repo-root paths only works inside a git checkout. That root is also the containment boundary: a path leaving it, or one reached through a symbolic link, is refused rather than read. Paths are normalised before resolution, soci/../shared.ymlandci//shared.ymlresolve here where GitLab looks up the literal blob path and finds neither. - The preview commands decide top-level
include:rules without GitLab CI/CD variables.glci jobs,show,variables,lint,mergedanddoctorfetch no project, group or instance variables, so an include rule’sif:there cannot test one, where GitLab’s can. Supply such a variable locally (--env,--env-file,.glci.envor a preset’senv) to preview the include as GitLab would decide it.glci runfetches them before it parses, so its include rules, top-level and downstream, do see them. - A rule’s clauses are checked in a fixed order (
if:, thenchanges:, thenexists:), stopping at the first that fails. GitLab follows their order in the file. The verdict is the same either way, except where achanges: compare_to:names no commit: a rule that listsexists:before it, orif:after it, can be refused on one side and not the other. Seerules:changes:compare_to is not a valid ref. - Some
include:rules cannot be decided locally. glci does not evaluate a rule usingregexp:inexists:orchanges:, orproject:/ref:inexists:. Offline the include is kept, with a warning, and dropped, with a warning, if its location is invalid or its file does not resolve, since GitLab may leave it out unread (a rule GitLab refuses inside the dropped file then refuses nothing); on the Lint API route (GLCI_PREFER_API=1, or the fallback when the offline parse fails) the entry is left for GitLab to decide. - The Lint API route leaves some
include:rules to GitLab. An entry whose rules reference a masked variable is left for GitLab to decide, since a masked value never shapes the request. Include rules inside a file GitLab fetches (remote:,project:,template:,component:) are decided by GitLab’s lint against its default branch, not the simulated context; glci cannot see inside those files, so it warns once whenever the request sends such an entry. rules: exists:in an include nested in aproject:orcomponent:file on a very large repository — the project’s file listing stops at 20,000 files (or 200 pages of the repository tree API), and from thereexists:is assumed to match, even for an exact path, where GitLab checks the whole tree. glci warnsinclude rules in "<project>" at "<ref>": listing its files stopped at <N> files; a rules:exists: there is assumed to match.rules: changes:against an empty diff — a push or merge request whose diff changes no file (git commit --allow-empty, commits that cancel out) makes everychanges:match, where GitLab matches none. A branch push reads the remote’s commit from your remote-tracking refs, so it is only as current as your lastgit fetch. See The changes diff.- Protected variables are fetched regardless of branch protection status.
- Kubernetes executor is not supported — only Docker.
- Git submodules — served from the mock for relative URLs and for absolute HTTP(S) URLs on the project’s own GitLab host (SSH URLs only under
GIT_SUBMODULE_FORCE_HTTPS); anything on another host is left to the network and needs credentials in the container. Objects come from your checkout, a--project-dir/[projects]mapping, or a clone from GitLab limited to the superproject’s own namespace or below. A submodule glci cannot reach is adaemon: warning:inglci daemon logsand the job’s checkout fails. Child and cross-project pipelines are served too, each against its own project path, and a project path is served once per pipeline prefix — the first walk wins. Up to 10 levels deep, 64 repositories per walk.GIT_SUBMODULE_UPDATE_FLAGS: --remotefollows the submodule’s default branch as your local copy last fetched it, not GitLab’s current tip. See Git submodules. retry:does not cover job timeouts — glci only re-runs a job after the runner reported a result, soretry: when: job_execution_timeoutandretry: when: runner_system_failurenever fire locally. A runner that picks a job up and then goes silent does trip the mock server’s stuck timer, soretry: when: stuck_or_timeout_failureworks.allow_failureis honoured for all of these. See Tolerated failures.- Child pipelines —
trigger: include:supports up to 2 levels of nesting (matching GitLab). A child’s own config resolvesinclude:(includingproject:/component:) against the same GitLab instance and token as the parent, and from the repository root, whatever directory glci was run from. - Merge request variables describe a merge request that does not exist, so
CI_MERGE_REQUEST_IID,_ID,_DIFF_ID,_TITLEand the_DRAFT/_SQUASH_ON_MERGE/_PROTECTEDflags are fixed values rather than a real merge request’s.CI_MERGE_REQUEST_LABELS,_MILESTONE,_ASSIGNEESand_APPROVEDare never published at all, because GitLab defines them only once the merge request carries a label, a milestone, an assignee or an approval — a rule that branches on them takes the unset path locally.CI_MERGE_REQUEST_EVENT_TYPEis alwaysdetached: merged-result and merge-train pipelines run on a commit GitLab creates on the fly and have no local equivalent.CI_MERGE_REQUEST_REF_PATHnames a ref the repository glci serves does not carry, sogit fetchof it fails inside a job.CI_MERGE_REQUEST_DIFF_BASE_SHAis your repository’s merge base for rules; inside a job it is the served repository’s commit with that merge base’s files, whenever it has one, sogit diff "$CI_MERGE_REQUEST_DIFF_BASE_SHA"...HEADworks there (not withGIT_DEPTH: 1). See Context simulation. CI_DEFAULT_BRANCHcomes from[defaults] default_branch, thenrefs/remotes/origin/HEAD, thenmain— so on a repository whose default branch ismasterand whose clone never recorded it,$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCHrules diverge from GitLab. Setdefault_branch = "master"in the project’s.glciconfig.tomlto fix it for everyone who clones the repository, or rungit remote set-head origin -ato fix it for this clone. If the name you typed is not a usable branch name, glci says so on stderr and keeps the next answer in the order, so check that line before assuming the key took effect. Outside a merge request pipeline into it, the served repository carries the default branch as a second name for the pipeline’s commit, so once a job has fetched it,git diff origin/<default> HEADis empty rather than a real diff. In a merge request pipeline into it, the branch has your checkout’s files, on a made-up merge base the commit under test is served on too, so two-dot and three-dot diffs both work. See Context simulation.- The pipeline’s ref — under
--context branch=<name>ortag=<name>, the served repository carriesrefs/heads/<name>orrefs/tags/<name>, sogit clone --branch(FF_USE_GIT_NATIVE_CLONE) andgit fetch origin "$CI_COMMIT_REF_NAME"work, but it names the commit under test rather than your real branch or tag. A name that cannot exist beside the branches the served copy already has (branch=main/xwhenmainis checked out or is the default branch) is left out with a warning in the mock server log (docker logs glci-mock); a name git cannot store is left out with a warning in the daemon log (glci daemon logs). The runner is then asked for the pipeline’s commit alone, so only a job that clones or fetches the ref itself fails. The job payload names the ref,ref_type(tagfor a tag pipeline) and refspecs as GitLab’s does, except that a merge request pipeline’s ref is its source branch rather thanrefs/merge-requests/<iid>/head, which glci does not serve. A shallow fetch (GIT_DEPTHdefaults to 20) takes only the pipeline’s own ref, soorigin/mainis missing on a feature branch, as on GitLab. See Context simulation. - The merge request’s target branch — under
--context merge_request, a job’s owngit fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"works when your checkout has the target branch (refs/heads/<target>orrefs/remotes/origin/<target>), and a two-dotgit diff origin/<target> HEADcompares the real trees. The runner’s shallow fetch does not bring the target branch, as on GitLab, so the job has to fetch it. The served target branch has no real history, but glci serves it and the commit under test on a commit with your checkout’s merge base’s files, so a three-dotgit diff origin/<target>...HEADandgit merge-basework too, at the default depth of 20 (atGIT_DEPTH: 1they fail, as on GitLab), and the job’sCI_MERGE_REQUEST_DIFF_BASE_SHAis that commit. When the checkout lacks the branch, the fetch fails withcouldn't find remote ref, andglci runwarnsmerge request target branch "<target>" is not served(atarget_branch_not_servedevent under--json); rungit fetch origin <target>locally and run again. The default branch (the target without--mr-target) is served the same way, with your checkout’s files for it, whileHEADand$CI_DEFAULT_BRANCHstill name it; it stays the commit under test, with empty diffs, only when your checkout’smain(ororigin/main) has the same files or is missing (then glci warnstarget_branch_is_commit_under_test: the fetch still works, but the diff is empty), when the source branch is the default branch itself, or when no other branch would name the commit under test (--mr-source main/xwithmainchecked out, or a detachedHEADwithout--mr-source). A checked-out branch that is the target of another source branch is treated the same way. See Context simulation. - Dynamic child pipelines —
trigger:include:artifactruns a child pipeline whose YAML a generator job produced. The generator must run before the trigger job (earlier stage orneeds:); otherwise the trigger fails withartifact include "…": job "…" produced no artifacts. An entry itsrules:leave out never needs its artifact, and one whose rules glci cannot decide is left out, with a warning, when its artifact is missing. Each artifact-sourced config file is capped at 5 MiB and an empty file is rejected. - Cross-project triggers —
trigger: project:resolves from local directories or clones from GitLab. A cloned target has only its.yml/.yamlfiles extracted (the only thing aninclude:can name), so itsrules: exists:sees no other file; map the project locally when that matters. More than 64 MiB of YAML is refused. The target’s config is read from itsci_config_pathsetting, from[projects]or the projects API; see Where the target’s configuration is read from. needs: parallel: matrix:— the shard selection is not resolved: glci waits on every shard of the target, so ifrules:leave out a shard the entry did not pick, the dependent stalls where GitLab would run it. Such an entry is also not checked for a targetrules:leave out (see Optional needs).parallel: matrix:declaration order is read from the YAML, so shard names andCI_NODE_INDEXmatch GitLab. Inline,extends:,include:, YAML anchors, merge keys (<<:) and!referenceto any list (matrix: !reference [.matrices, deploy]) all keep their declared order. Two shapes carry no order for glci to read and fall back to alphabetical variable order: a matrix entry that is itself a!referenceto a mapping (matrix: [!reference [.entry]]), where onlyGLCI_PREFER_API=1keeps the order, and a matrix set throughparallelin.glciconfig.toml, where TOML tables are unordered. See Parallel job variables.- Some
parallel:shapes GitLab rejects are accepted locally:parallel: 2.5(truncated to 2 shards),parallel: "3",parallel: {}, and an unknown key besidematrix:are ignored rather than reported. The diagnostics glci does mirror are the count range (1-200), the 200-job matrix cap, a matrix that is not a list of mappings, an entry with no variables, and a value that is not a string or an integer. - Some string keywords are not type-checked, for example
release:,id_tokens:,workflow: auto_cancel:, the keys underenvironment: kubernetes:andartifacts: reports:, an image’s or service’sdocker:andkubernetes:options, aneeds:entry’sproject:,ref:andpipeline:(and a key it does not take, or a kind of need the job does not take, such asneeds: {pipeline: group/upstream}on a job that is no trigger job), and a rule’svariables:. A boolean there is dropped where GitLab refuses the file. The keywords that are checked are checked only as far as glci can reproduce GitLab: the syntax of anartifacts:orpages:expire_in:duration and of anonly:/except:orcoverage:regular expression is not checked, nor the length limits, andretry: when:is refused only for a value that is no string, since GitLab’s set of failure reasons grows with each release (itscontains unknown valuesmessage then lists only those values). - A
!referenceto a target in a skipped include is a missing value. When an include was skipped for want of a token, a!referenceinto it resolves to nothing, with a warning. Where GitLab requires a value — animage:orenvironment:name:, a delayed job’sstart_in:, a variable’svalue:besideoptions:— that missing value is then refused (... name can't be blank). Configure a token so the include is fetched. - A job’s rules are validated even when the job itself is invalid. GitLab composes no
rules:for a job that fails its own checks (an unknownwhen:, say) and so reports only those; glci reports the job’s rule errors beside them. - Some numbers reach a variable as other text than GitLab’s. An unquoted integer past 64 bits keeps the text written (
0x1FFFFFFFFFFFFFFFFF), where GitLab sets its decimal digits. A whole float such asV: 1.0orV: 1:30.0is set to1(5400) on the default offline route; the Lint API route (GLCI_PREFER_API=1) and GitLab set1.0(5400.0). A fractional one (1.5,1:30.5) is right on both. - A variable’s name is echoed as written in its messages (
variables:MY_VAR config ...), as a job’s is, where GitLab downcases the whole message (variables:my_var config ...). - A boolean mapping key and a quoted key of the same text are one key: GitLab keeps a plain
on:(the booleantrue) apart from a quoted"true":; glci keeps only the quoted one. A boolean key it refuses is still reported, and listed by job name rather than in document order. A job named by a boolean is also checked as a job namedtrueorfalse, where GitLab checks nothing under it. rules: if:comparisons do not chain. GitLab’s parser reads==,!=,=~and!~left-associatively, so$A == "x" == "y"compares the first comparison’strue/falseagainst"y"; glci refuses it, reporting the leftover as trailing input. A string literal reaches that shape on its own, because\"does not escape a quote:$A == "x\" == "y"closes the literal at that quote and leaves== "y"over. GitLab accepts such a file and glci rejects it, soglci lintexits non-zero andglci runrefuses to start. See operators and operands and String literals.- Crash recovery requires both mock server and runner containers to survive. Secrets are held only in daemon memory (mlocked, never written to disk) and are lost on daemon restart, so resumed pipelines always re-fetch remote variables from the GitLab API. Remote
include:files are the exception: those come from~/.glci/cache/includeson resume rather than being re-fetched.