Fix support for multiple GPG recipients (#342)
This commit is contained in:
parent
a4d39c7504
commit
5adb486727
2 changed files with 5 additions and 2 deletions
|
@ -326,7 +326,7 @@ def test_multi_key(runner, yadm_cmd, gnupg):
|
||||||
|
|
||||||
# specify two encryption recipient
|
# specify two encryption recipient
|
||||||
os.system(' '.join(yadm_cmd(
|
os.system(' '.join(yadm_cmd(
|
||||||
'config', 'yadm.gpg-recipient', f'"{KEY_NAME} second-key"')))
|
'config', 'yadm.gpg-recipient', f'"second-key {KEY_NAME}"')))
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['GNUPGHOME'] = gnupg.home
|
env['GNUPGHOME'] = gnupg.home
|
||||||
|
|
5
yadm
5
yadm
|
@ -865,7 +865,10 @@ function _set_gpg_options() {
|
||||||
if [ "$gpg_key" = "ASK" ]; then
|
if [ "$gpg_key" = "ASK" ]; then
|
||||||
GPG_OPTS=("--no-default-recipient" "-e")
|
GPG_OPTS=("--no-default-recipient" "-e")
|
||||||
elif [ "$gpg_key" != "" ]; then
|
elif [ "$gpg_key" != "" ]; then
|
||||||
GPG_OPTS=("-e" "-r $gpg_key")
|
GPG_OPTS=("-e")
|
||||||
|
for key in $gpg_key; do
|
||||||
|
GPG_OPTS+=("-r $key")
|
||||||
|
done
|
||||||
else
|
else
|
||||||
GPG_OPTS=("-c")
|
GPG_OPTS=("-c")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue