[featurerequest] comments in .gpg-id files

Kjetil Torgrim Homme kjetil.homme at redpill-linpro.com
Tue Sep 29 17:02:44 CEST 2020


On 2020-09-24 17:02, Arthur Lutz wrote:> One thing that would be neat
(and maybe is already possible) would be to
> have comments in the .gpg-id file to indicate who the key belongs to.
> Going from :
> 
>   cat teamA/.gpg-id
>   0123901293
>   0912385810
> 
> To
> 
>   cat teamA/.gpg
>   # bob
>   0123901293 
>   # alice
>    0912385810

we had the same challenge, so I patched this some time ago, see thread
"[PATCH] Allow comments in .gpg-id" from 2019-12-17.

it only accepts comments after the gpg-ids, though.  unfortunately,
Jason has not merged it upstream.  the patch is quite simple:

--- src/password-store.sh
+++ src/password-store.sh
@@ -99,6 +99,7 @@ set_gpg_recipients() {

     local gpg_id
     while read -r gpg_id; do
+        gpg_id="${gpg_id%%#*}"    # strip comment
         GPG_RECIPIENT_ARGS+=( "-r" "$gpg_id" )
         GPG_RECIPIENTS+=( "$gpg_id" )
     done < "$current"


-- 
Kjetil T. Homme
Redpill Linpro AS - Changing the game

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20200929/fddf1f46/attachment.asc>


More information about the Password-Store mailing list