Resolve .gpg-id files must end in a newline to be recognized

Richard Sent richard at freakingpenguin.com
Thu May 30 16:12:40 UTC 2024


Hi all,

To create subdirectories in .password-store that are encrypted
using a different gpg key, the user needs to create a .gpg-id file in
that subdirectory. What isn't obvious however is that that .gpg-id file
needs to end in a newline, not just the keyid. If the user fails to do
that, they will be shown a warning like this:

--8<---------------cut here---------------start------------->8---
~/rsent/rsent/machines $ pass generate LAN/restic
You did not specify a user ID. (you may use "-r")

Current recipients:

Enter the user ID.  End with an empty line: 
gpg: signal Interrupt caught ... exiting
interrupt
--8<---------------cut here---------------end--------------->8---

At this point the user may choose to enter the UID manually. However,
there's no indication that this problem is caused by missing a newline
in .gpg-id. ("End with an empty line" is gpg referring to ending
interactive uid input)

I think password-store should either:

1. Handle .gpg-id files where the last entry does not end in a newline
2. Display an explicit error if it fails to read the recipient from a
.gpg-id file, or at least if the file does not end in a newline.

Pass version: 1.7.4

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.


More information about the Password-Store mailing list