What the error means
In YAML a colon followed by a space turns the text before it into a key. A plain, unquoted value can still contain a colon when it is not followed by a space, as in http://example.com:8080. When the parser finds a second ": " on the same line, or a key nested under a value that already has one, it cannot make a second mapping there and raises "mapping values are not allowed here", with the line and column of the extra colon.
JavaScript's js-yaml, which the validator above uses, words the same problems as "bad indentation of a mapping entry". The reported line and column are the same.
Causes and fixes
Wording below is PyYAML's. Each example fails the same way in both parsers.
Colon and space inside an unquoted value
Error: mapping values are not allowed here in "<unicode string>", line 1, column 12
Invalid
title: Note: draft
Fixed
title: "Note: draft"
Put the value in quotes, or use a block scalar (title: | on its own line, then the text indented below it). Single or double quotes both work.
Command or message with a colon
Error: mapping values are not allowed here in "<unicode string>", line 1, column 16
Invalid
run: echo hello: world
Fixed
run: 'echo hello: world'
Shell commands in CI files such as GitHub Actions or GitLab CI often contain colons. Quote the whole command. A quote inside the value is not enough: command: echo "a: b" still fails, because the value does not start with a quote.
Nested key indented under a value
Error: mapping values are not allowed here in "<unicode string>", line 2, column 8
Invalid
name: web image: nginx
Fixed
name: web image: nginx
name already has the value web, so image cannot be nested under it. Align the keys, or move the value onto its own mapping: put name: on a line by itself and indent both lines below it.
Two keys on one list line
Error: mapping values are not allowed here in "<unicode string>", line 1, column 10
Invalid
- name: x: y
Fixed
- name: 'x: y'
The list item is a mapping with the key name, and the value x: y contains a second colon. Quote the value.