Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 5adb486

Browse files
Fix support for multiple GPG recipients (yadm-dev#342)
1 parent a4d39c7 commit 5adb486

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/test_encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def test_multi_key(runner, yadm_cmd, gnupg):
326326

327327
# specify two encryption recipient
328328
os.system(' '.join(yadm_cmd(
329-
'config', 'yadm.gpg-recipient', f'"{KEY_NAME} second-key"')))
329+
'config', 'yadm.gpg-recipient', f'"second-key {KEY_NAME}"')))
330330

331331
env = os.environ.copy()
332332
env['GNUPGHOME'] = gnupg.home

yadm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,10 @@ function _set_gpg_options() {
865865
if [ "$gpg_key" = "ASK" ]; then
866866
GPG_OPTS=("--no-default-recipient" "-e")
867867
elif [ "$gpg_key" != "" ]; then
868-
GPG_OPTS=("-e" "-r $gpg_key")
868+
GPG_OPTS=("-e")
869+
for key in $gpg_key; do
870+
GPG_OPTS+=("-r $key")
871+
done
869872
else
870873
GPG_OPTS=("-c")
871874
fi

0 commit comments

Comments
 (0)