Skip to content
Latchkey

GitLab "Found errors in your .gitlab-ci.yml" (CI Lint)

The CI Lint tool re-runs the same validation a pipeline would and reports every problem at once. The headline is generic - the list beneath it names each offending keyword.

What this error means

The CI Lint page (or the Pipeline Editor "Validate" tab) shows a red "Found errors in your .gitlab-ci.yml" banner followed by one or more specific messages. No pipeline runs until the list is empty.

gitlab-ci
Found errors in your .gitlab-ci.yml:
  - jobs:test:script config should be a string or a nested array of strings
  - jobs:deploy config contains unknown keys: enviroment

Common causes

One or more keyword errors

Each bullet is an independent problem - a wrong type, a misspelled key, or a missing required value. The lint aggregates them so you can fix all at once.

Validating against the merged config

When include: or extends: is involved, the lint validates the merged result, so an error may originate from an included file rather than the local one.

How to fix it

Resolve each listed error in turn

  1. Open CI/CD - Editor or CI/CD - Pipelines - CI lint.
  2. Fix every bullet; each names the exact job and keyword path.
  3. Re-run the lint until it reports "Pipeline is valid".

Lint the merged YAML before pushing

Validate the fully merged configuration (with includes resolved) via the API.

Terminal
curl --header "PRIVATE-TOKEN: ${TOKEN}" \
  "https://gitlab.com/api/v4/projects/${ID}/ci/lint?include_merged_yaml=true" \
  --data-urlencode "content@.gitlab-ci.yml"

How to prevent it

  • Edit pipeline config in the Pipeline Editor, which lints live as you type.
  • Run the ci/lint API in a pre-push hook for configs with many includes.
  • Add a GitLab CI JSON schema to your IDE for inline keyword checks.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →