-
Notifications
You must be signed in to change notification settings - Fork 978
Description
With a running gpg-agent, and a passphrase-protected key in ~/.config/sops/age/keys.txt, sops attempts to let the agent prompt for a passphrase, but it seems the request is malformed, here is the error :
age1k6akl9r65sr3hdyfmqrqek0d38k24cqtex3k45nuckam6g5kzy9ss7yugt: FAILED
- | failed to create reader for decrypting sops data key with
| age: failed to decrypt identity file: could not read
| passphrase: gpg-agent passphrase request errored: ERR
| 67109144 IPC parameter error <GPG Agent> - invalid length of
| cacheID
| . Did not find keys in locations
| 'SOPS_AGE_SSH_PRIVATE_KEY_FILE',
| '/home/termaxima/.ssh/id_rsa', 'SOPS_AGE_KEY',
| 'SOPS_AGE_KEY_FILE', and 'SOPS_AGE_KEY_CMD'.
With gpg-agent, passphrase requests work perfectly well (although the lack of caching means the user is re-prompted for the same passphrase multiple times, if the protected key is not the first on the recipient list)
This was tested using sops 3.11.0 and gpg-agent 2.4.8 (libcrypt 1.11.2), using NixOS.
Possible links with pull request #1400
I have found this message on the GnuPG mailing list, which seems to show how to reproduce a similarly malformed request to the gpg passphrase prompt (and how to fix it). The error code is the same.
I'm trying to find the cause (see comments below) but I'm a total noob in Go, so I'm not sure I can fix this myself.