GitLab: "config should be an array of hashes"
This error shows when you put more than one !reference tag inside an array of a keyword that does not accept them (GitLab docs: debugging CI/CD pipelines, checked November 19, 2026). The full message looks like this:
This GitLab CI configuration is invalid: jobs:my_job_name:parallel:matrix config should be an array of hashes.
Why
You can use several !reference tags to build up an array only in script, rules and stages. Other keywords that expect an array, such as parallel:matrix in the message above, do not support it, and GitLab reports that the array is not made of hashes.
To see the error next to the pipeline that failed: Pipelines and Jobs Inbox for GitLab CI, a plugin for JetBrains IDEs, shows under a pipeline that failed before any job ran the messages GitLab gives, such as a configuration error.
Fix
- Use nesting instead of several tags in the same array. GitLab links a comment in issue 439828 that shows the pattern.
- Use YAML anchors. Anchors do not work across files brought in with
include, so this fits only when the pieces are in one file.
Another error in the same family, for a job that has needs but neither script nor trigger, is config should contain either a trigger or a needs:pipeline.
GitLab pipelines in IntelliJ IDEA
Pipelines and Jobs Inbox for GitLab CI, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pipelines of your GitLab projects with their jobs by stage. Under a pipeline that failed before any job ran it shows the messages GitLab gives (errorMessages), such as the configuration error, and it shows YAML errors as GitLab reports them, so you read the error without opening GitLab. After you fix the file, you can run a new pipeline on the branch from the IDE (Pro). Reading is free; retrying, cancelling and running are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab "config contains unknown keys" · GitLab "config should contain either a trigger or a needs:pipeline" · GitLab pipeline failed with no jobs · GitLab "The parsed YAML is too big"