Skip to content
Latchkey

Bitbucket "We couldn't parse your bitbucket-pipelines.yml"

Bitbucket could not parse the YAML document at all - a structural error such as a tab character, inconsistent indentation, or an unclosed quote - so no pipeline can be derived from it.

What this error means

The Pipelines UI reports it could not parse bitbucket-pipelines.yml, often with a line and column. Unlike a configuration error (valid YAML, invalid pipeline shape), the document itself is malformed.

bitbucket-pipelines
We couldn't parse your bitbucket-pipelines.yml file.
(line 8, column 5): mapping values are not allowed here

Common causes

Tabs or inconsistent indentation

YAML forbids tabs and is whitespace-sensitive. A stray tab or a misaligned indent breaks the parse at that line.

Unclosed quote or stray colon

An unterminated string, or a colon inside an unquoted value, confuses the scanner and aborts parsing.

How to fix it

Fix indentation and remove tabs

Use consistent two-space indentation with no tabs.

bitbucket-pipelines.yml
pipelines:
  default:
    - step:
        script:
          - echo "build"   # two-space indents, no tabs

Validate the YAML before pushing

  1. Use the in-app Pipelines validator or a YAML linter.
  2. Quote values that contain colons or special characters.
  3. Reveal whitespace in your editor to catch tabs.

How to prevent it

  • Configure the editor to use spaces, never tabs, in YAML.
  • Validate bitbucket-pipelines.yml before committing.
  • Quote values containing colons or special characters.

Frequently asked questions

What causes ""couldn't parse your yml""?
YAML forbids tabs and is whitespace-sensitive. A stray tab or a misaligned indent breaks the parse at that line.
How do I fix "couldn't parse your yml"?
Use consistent two-space indentation with no tabs.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card