getsops/sops · error

gpg-agent passphrase request errored: %s

Error message

gpg-agent passphrase request errored: %s

What it means

Error "gpg-agent passphrase request errored: %s" thrown in getsops/sops.

Source

Thrown at age/encrypted_keys.go:173

			Passphrase: func() (string, error) {
				conn, err := gpgagent.NewConn()
				if err != nil {
					return pluginTerminalUI.RequestValue("", fmt.Sprintf("Enter passphrase for identity '%s':", location), true)
				}
				defer func(conn *gpgagent.Conn) {
					if err := conn.Close(); err != nil {
						log.Errorf("failed to close connection with gpg-agent: %s", err)
					}
				}(conn)

				req := gpgagent.PassphraseRequest{
					CacheKey: cacheKey,
					Prompt:   "Passphrase",
					Desc:     fmt.Sprintf("Enter passphrase for identity '%s':", location),
				}
				pass, err := conn.GetPassphrase(&req)
				if err != nil {
					return "", fmt.Errorf("gpg-agent passphrase request errored: %s", err)
				}
				//make sure that we won't store empty pass
				if len(pass) == 0 {
					IncorrectPassphrase()
				}
				return pass, nil
			},
			IncorrectPassphrase: IncorrectPassphrase,
			NoMatchWarning: func() {
				log.Warnf("encrypted identity '%s' didn't match file's recipients", location)
			},
		}}
		return ids, nil
	// An unencrypted age identity file.
	default:
		ids, err := parseIdentities(b, allowMultipleKeysPerLine)
		if err != nil {
			return nil, fmt.Errorf("failed to parse '%s' age identities: %w", location, err)

View on GitHub (pinned to 13442bb981)

When it happens

Trigger: Thrown at age/encrypted_keys.go:173 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/069973f60c610418. Report an issue: GitHub.