# GitLab CI: Found errors in your .gitlab-ci.yml: jobs:build config contains unknown keys: scripts

**Code:** `.gitlab-ci.yml invalid` · **Category:** CI/CD · **Seen on:** GitLab CI

GitLab rejected the pipeline configuration, so no pipeline was created — the message names the job and the problem.

## Meaning

The CI Lint tool (CI/CD → Editor → Validate, or Pipelines → CI lint) shows the exact error. Typical causes are unknown keys (`scripts` for `script`), a missing `script`, undefined stages or `needs`, wrong `extends`/`include` references, and YAML indentation.

## Common causes

- Misspelled key (`scripts`, `stage:` typo)
- Job uses a stage that is not listed in `stages:`
- `needs:` or `extends:` pointing to a job that does not exist
- `include:` file path/project/ref wrong or not accessible
- YAML indentation or quoting error

## Quick fix

1. Open CI/CD → Editor and press Validate to see the full error
2. Compare stage names with the `stages:` list
3. Check `include:` paths and project permissions

## Detailed fix by platform

### GitLab CI

1. Lint via API: `curl --header "PRIVATE-TOKEN: $TOKEN" "https://gitlab.com/api/v4/projects/$ID/ci/lint"`

## Code examples

### Minimal valid job

```yaml
stages: [build, test]
build:
  stage: build
  script:
    - make build
```

## How to diagnose

1. **Message** — Which job and key does GitLab name?
2. **Lint** — Does CI Lint show more?
3. **Includes** — All include paths reachable?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gitlab-yaml-invalid-config)
