getsops/sops · error
%s: %w%s%s
Error message
%s: %w%s%s
What it means
Error "%s: %w%s%s" thrown in getsops/sops.
Source
Thrown at age/keysource.go:235
func formatError(msg string, err error, errs errSet, unusedLocations []string) error {
var loadSuffix string
if len(errs) > 0 {
loadSuffix = fmt.Sprintf(". Errors while loading age identities: %s", errs.Error())
}
var unusedSuffix string
if len(unusedLocations) > 0 {
count := len(unusedLocations)
if count == 1 {
unusedSuffix = fmt.Sprintf(" '%s'", unusedLocations[0])
} else if count == 2 {
unusedSuffix = fmt.Sprintf("s '%s' and '%s'", unusedLocations[0], unusedLocations[1])
} else {
unusedSuffix = fmt.Sprintf("s '%s', and '%s'", strings.Join(unusedLocations[:count-1], "', '"), unusedLocations[count-1])
}
unusedSuffix = fmt.Sprintf(". Did not find keys in location%s.", unusedSuffix)
}
if err != nil {
return fmt.Errorf("%s: %w%s%s", msg, err, loadSuffix, unusedSuffix)
} else {
return fmt.Errorf("%s%s%s", msg, loadSuffix, unusedSuffix)
}
}
// Decrypt decrypts the EncryptedKey with the parsed or loaded identities, and
// returns the result.
func (key *MasterKey) Decrypt() ([]byte, error) {
var errs errSet
var unusedLocations []string
if len(key.parsedIdentities) == 0 {
var ids ParsedIdentities
ids, unusedLocations, errs = key.loadIdentities()
if len(ids) == 0 {
log.Info("Decryption failed")
return nil, formatError("failed to load age identities", nil, errs, unusedLocations)
}
ids.ApplyToMasterKey(key)View on GitHub (pinned to 13442bb981)
When it happens
Trigger: Thrown at age/keysource.go:235 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/d3cdea2575c03dca.
Report an issue: GitHub.