#1137246 gnupg encrypts the home directory when using --homedir argument

Package:
gnupg
Source:
gnupg
Submitter:
catastorff-efcalation
Date:
2026-05-21 16:51:00 UTC
Severity:
normal
#1137246#5
Date:
2026-05-21 16:48:25 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
encrypt using --homedir argument

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

my USB dongle is Luks encrypted (here decrypted) where my --homedir gpg lie, with these two commands I was shocked to find ...


tar -cf - /home/zer/install-GrapheneOS/unpublic-dir | gpg --homedir /media/zer/10cd7cc6-991b-4a0c-a0a7-c2f11b4b01a7/gpg/.gnupglogin --encrypt --recipient AB7160AB39BE4FC61A4122FD6CCC936783518A02 -o /home/zer/install-GrapheneOS/unpublic-dir.tar.gpg


   * What was the outcome of this action?

my home directory was encrypted:

mkdir /home/zer/install-GrapheneOS/decrypted-unpublic/; gpg --homedir /media/zer/10cd7cc6-991b-4a0c-a0a7-c2f11b4b01a7/gpg/.gnupglogin --decrypt /home/zer/install-GrapheneOS/unpublic-dir.tar.gpg | tar -xf - -C /home/zer/install-GrapheneOS/decrypted-unpublic/

... I had encrypted my home folder into ls install-GrapheneOS/decrypted-unpublic/home/...

   * What outcome did you expect instead?

I hoped the gpg agent would use keys in --homedir and encrypt the directory i am pointing for.

*** End of the template - remove these template lines ***