From d7ee812cf903f54dabdb3071cff52a1230cfa5f8 Mon Sep 17 00:00:00 2001 From: Manuel Riel <3916435+m3nu@users.noreply.github.com> Date: Tue, 11 Jun 2019 08:20:53 +0800 Subject: [PATCH] If BORG_PASSCOMMAND is found, unset BORG_PASSPHRASE. Fixes #272 (#288) --- src/vorta/borg/borg_thread.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vorta/borg/borg_thread.py b/src/vorta/borg/borg_thread.py index 454aa3d6..17799040 100644 --- a/src/vorta/borg/borg_thread.py +++ b/src/vorta/borg/borg_thread.py @@ -60,6 +60,9 @@ class BorgThread(QtCore.QThread, BackupProfileMixin): else: env['BORG_PASSPHRASE'] = '9999999' # Set dummy password to avoid prompt. + if env.get('BORG_PASSCOMMAND', False): + env.pop('BORG_PASSPHRASE', None) # Unset passphrase + env['BORG_RSH'] = 'ssh -oStrictHostKeyChecking=no' ssh_key = params.get('ssh_key') if ssh_key is not None: