Bitbucket Pipelines: "There is an error in your bitbucket-pipelines.yml"
Bitbucket read the file and refused it, so the pipeline did not run. The message names where, then what:
There is an error in your bitbucket-pipelines.yml at [pipelines > branches > develop > 1 > step > script > 0]. Missing or empty command string. Each item in this list should either be a single command string or a map defining a pipe invocation.
The part in brackets is the path from the top of the file: names are keys, numbers are positions in a list counting from 0, and (root level) is the top of the file. Here: under pipelines:, branches:, develop:, the second item, its step:, its script:, the first command.
Four messages people report, and what was behind them
From Atlassian's community, where each was answered:
at [(root level)]. The top-level "pipelines" section is missing, empty, or null.The linepipelines:was indented; it must start at the left edge. In a file that shares pipelines with other repositories (export: true, Premium), Atlassian's support adds that the file still needs apipelines:section of its own, for example onecustom:pipeline that never starts by itself (thread, March 2025).To be precise: The step section is empty or null.A few spaces missing in the indentation, which the asker found while Atlassian's online validator said the file was fine (thread, May 2022).Missing or empty command string.A step built from a YAML anchor (<<: *build-test) with one more key next to it. Atlassian's support: anchors in Pipelines cannot override one child of a section, they replace the whole section, and here the step'sscriptwas lost; leave that key out of the anchor and set it in each step (thread, April 2025).at [options > max-time]. To be precise: This value should be an integer (it is currently defined as a string).The value was$MAX_RUN_TIME. The YAML file has no variables:$MAX_RUN_TIMEis just text there, so write the number (thread, October 2020).
Check the file before you push
- Atlassian's JSON schema for the file is at
https://api.bitbucket.org/schemas/pipelines-configuration, and SchemaStore's catalog pointsbitbucket-pipelines.ymlto it. IntelliJ IDEA applies SchemaStore's schemas to YAML files and downloads them automatically by default (JetBrains: JSON; the switches are under Settings > Languages & Frameworks > Schemas and DTDs > Remote JSON Schemas). So the editor marks a misplaced key or a wrong type as you type. - Atlassian's online validator at bitbucket.org/product/pipelines/validator: paste the file. A Pipelines developer wrote in May 2025 that it is "quite limited": it does not handle anchors and aliases at all, and it does not use the JSON schema (thread).
- Neither catches everything. In the same thread, a step with no
scriptpassed the JSON schema in IntelliJ IDEA while the validator rejected it. Bitbucket's own check when you push is the one that counts.
Watch your pipelines from IntelliJ IDEA
Pipeline Inbox for Bitbucket Pipelines, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pipelines of all your Bitbucket Cloud repositories in an IDE tool window, next to the editor that checks the file. For a failed pipeline it shows the failed step and the end of its log, or the reason Bitbucket gives when it ended the pipeline with an error, and your current branch's pipelines are in the status bar. The list, steps and logs are free; running, re-running and stopping pipelines are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
Atlassian, Bitbucket and Bitbucket Pipelines are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by any of them.
More: Pipelines did not run after a push · Running a custom pipeline with variables · "command not found" · The build passed before and fails now · "This pipeline was paused" (deployments) · Bitbucket Pipelines plugins for IntelliJ IDEA, compared · 日本語