getsops/sops · error
YAML Negative indentation not accepted
Error message
YAML Negative indentation not accepted
What it means
Error "YAML Negative indentation not accepted" thrown in getsops/sops.
Source
Thrown at stores/yaml/store.go:356
}
if err != nil {
return nil, fmt.Errorf("Error unmarshaling input YAML: %s", err)
}
branch, err := store.yamlDocumentNodeToTreeBranch(data)
if err != nil {
return nil, fmt.Errorf("Error unmarshaling input YAML: %s", err)
}
branches = append(branches, branch)
}
return branches, nil
}
func (store *Store) getIndentation() (int, error) {
if store.config.Indent > 0 {
return store.config.Indent, nil
} else if store.config.Indent < 0 {
return 0, errors.New("YAML Negative indentation not accepted")
}
return IndentDefault, nil
}
// EmitEncryptedFile returns the encrypted bytes of the yaml file corresponding to a
// sops.Tree runtime object
func (store *Store) EmitEncryptedFile(in sops.Tree) ([]byte, error) {
branches, err := stores.SerializeMetadata(in, stores.MetadataOpts{
Flatten: stores.MetadataFlattenNone,
})
if err != nil {
return nil, fmt.Errorf("Error marshaling metadata: %s", err)
}
return store.EmitPlainFile(branches)
}
// EmitPlainFile returns the plaintext bytes of the yaml file corresponding to a
// sops.TreeBranches runtime objectView on GitHub (pinned to 13442bb981)
When it happens
Trigger: Thrown at stores/yaml/store.go:356 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getsops/sops@13442bb981 (2026-09-01).
Data as JSON: /api/errors/2e563c8d2d51a8d4.
Report an issue: GitHub.