getsops/sops · error
Cannot use more than one of encrypted_suffix, unencrypted_su
Error message
Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file
What it means
Error "Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file" thrown in getsops/sops.
Source
Thrown at stores/stores.go:293
}
if m.EncryptedSuffix != "" {
cryptRuleCount++
}
if m.UnencryptedRegex != "" {
cryptRuleCount++
}
if m.EncryptedRegex != "" {
cryptRuleCount++
}
if m.UnencryptedCommentRegex != "" {
cryptRuleCount++
}
if m.EncryptedCommentRegex != "" {
cryptRuleCount++
}
if cryptRuleCount > 1 {
return sops.Metadata{}, fmt.Errorf("Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file")
}
if cryptRuleCount == 0 {
m.UnencryptedSuffix = sops.DefaultUnencryptedSuffix
}
return sops.Metadata{
KeyGroups: groups,
ShamirThreshold: m.ShamirThreshold,
Version: m.Version,
MessageAuthenticationCode: m.MessageAuthenticationCode,
UnencryptedSuffix: m.UnencryptedSuffix,
EncryptedSuffix: m.EncryptedSuffix,
UnencryptedRegex: m.UnencryptedRegex,
EncryptedRegex: m.EncryptedRegex,
UnencryptedCommentRegex: m.UnencryptedCommentRegex,
EncryptedCommentRegex: m.EncryptedCommentRegex,
MACOnlyEncrypted: m.MACOnlyEncrypted,
LastModified: lastModified,View on GitHub (pinned to 13442bb981)
When it happens
Trigger: Thrown at stores/stores.go:293 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/96493983d2bb16af.
Report an issue: GitHub.