If BORG_PASSCOMMAND is found, unset BORG_PASSPHRASE. Fixes #272 (#288)

This commit is contained in:
Manuel Riel 2019-06-11 08:20:53 +08:00 committed by GitHub
parent 85e4d9d163
commit d7ee812cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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: