Skip to content

Commit 73ee3e5

Browse files
committed
Document using subkeys with GnuPG.
Converted from getsops/sops@9dbbc77 Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent b20d4f2 commit 73ee3e5

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

content/en/docs/_index.md

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

204204
This last step will decrypt `example.yaml` using the test private key.
205205

206+
## Encrypting with GnuPG subkeys
207+
208+
If you want to encrypt with specific GnuPG subkeys, it does not suffice to provide the
209+
exact key ID of the subkey to SOPS, since GnuPG might use *another* subkey instead
210+
to encrypt the file key with. To force GnuPG to use a specific subkey, you need to
211+
append `!` to the key's fingerprint.
212+
213+
``` yaml
214+
creation_rules:
215+
- pgp: >-
216+
85D77543B3D624B63CEA9E6DBC17301B491B3F21!,
217+
E60892BB9BD89A69F759A1A0A3D652173B763E8F!
218+
```
219+
220+
Please note that this is only passed on correctly to GnuPG since SOPS 3.9.3.
221+
206222
## Encrypting using age
207223
208224
[age](https://age-encryption.org/) is a simple, modern, and secure tool

0 commit comments

Comments
 (0)