Skip to content

Commit 9dbbc77

Browse files
committed
Document using subkeys with GnuPG.
Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 6ce9d66 commit 9dbbc77

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,22 @@ the example files and pgp key provided with the repository::
188188

189189
This last step will decrypt ``example.yaml`` using the test private key.
190190

191+
Encrypting with GnuPG subkeys
192+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193+
194+
If you want to encrypt with specific GnuPG subkeys, it does not suffice to provide the
195+
exact key ID of the subkey to SOPS, since GnuPG might use *another* subkey instead
196+
to encrypt the file key with. To force GnuPG to use a specific subkey, you need to
197+
append ``!`` to the key's fingerprint.
198+
199+
.. code:: yaml
200+
201+
creation_rules:
202+
- pgp: >-
203+
85D77543B3D624B63CEA9E6DBC17301B491B3F21!,
204+
E60892BB9BD89A69F759A1A0A3D652173B763E8F!
205+
206+
Please note that this is only passed on correctly to GnuPG since SOPS 3.9.3.
191207

192208
Encrypting using age
193209
~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)