GPG encryption fails due to invalid flag

Bug #1912580 reported by Jose Guedez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-duplicity
Fix Released
Critical
Jose Guedez

Bug Description

Running the do-backup action when configuring "gpg_public_key" to enable asymmetrical GPG encryption leads to a failure due to using the wrong flag.

The charm is using "--gpg-key" to enable gpg encryption [1], but the actual flag to do this in duplicity is "--encrypt-key" [2]

Full output of the action below, note the error: "no such option: --gpg-key"

  message: "Command \"['duplicity', '--rsync-options=-e \"ssh -i /root/.ssh/duplicity_id_rsa\"',
    'full', '/home/ubuntu/important', 'rsync://<USER>@<HOST>:22/mybackups/duplicity-1',
    '--gpg-key=<REDACTED>']\" failed with return code
    \"2\" and error output:\nUsage: \n duplicity [full|incremental] [options] source_dir
    target_url\n duplicity [restore] [options] source_url target_dir\n duplicity
    verify [options] source_url target_dir\n duplicity collection-status [options]
    target_url\n duplicity list-current-files [options] target_url\n duplicity cleanup
    [options] target_url\n duplicity remove-older-than time [options] target_url\n
    \ duplicity remove-all-but-n-full count [options] target_url\n duplicity remove-all-inc-of-but-n-full
    count [options] target_url\n\nBackends and their URL formats:\n cf+http://container_name\n
    \ file:///some_dir\n ftp://user[:password]@other.host[:port]/some_dir\n ftps://user[:password]@other.host[:port]/some_dir\n
    \ hsi://user[:password]@other.host[:port]/some_dir\n imap://user[:password]@other.host[:port]/some_dir\n
    \ rsync://user[:password]@other.host[:port]::/module/some_dir\n rsync://user[:password]@other.host[:port]/relative_path\n
    \ rsync://user[:password]@other.host[:port]//absolute_path\n s3://other.host[:port]/bucket_name[/prefix]\n
    \ s3+http://bucket_name[/prefix]\n scp://user[:password]@other.host[:port]/some_dir\n
    \ ssh://user[:password]@other.host[:port]/some_dir\n swift://container_name\n
    \ tahoe://alias/directory\n webdav://user[:password]@other.host/some_dir\n webdavs://user[:password]@other.host/some_dir\n
    \ gdocs://user[:password]@other.host/some_dir\n pydrive://<email address hidden>/some_dir\n
    \ mega://user[:password]@other.host/some_dir\n copy://user[:password]@other.host/some_dir\n
    \ dpbx:///some_dir\n onedrive://some_dir\n azure://container_name\n b2://account_id[:application_key]@bucket_name/[some_dir/]\n
    \ mf://user[:password]@other.host/some_dir\n\nCommands:\n cleanup <target_url>\n
    \ collection-status <target_url>\n full <source_dir> <target_url>\n incr <source_dir>
    <target_url>\n list-current-files <target_url>\n restore <source_url> <target_dir>\n
    \ remove-older-than <time> <target_url>\n remove-all-but-n-full <count> <target_url>\n
    \ remove-all-inc-of-but-n-full <count> <target_url>\n verify <target_url> <source_dir>\n\nduplicity:
    error: no such option: --gpg-key\n"

[1] https://git.launchpad.net/charm-duplicity/tree/src/lib/lib_duplicity.py#n127
[2] https://linux.die.net/man/1/duplicity

Related branches

Jose Guedez (jfguedez)
Changed in charm-duplicity:
assignee: nobody → Jose Guedez (jfguedez)
importance: Undecided → Critical
Xav Paice (xavpaice)
Changed in charm-duplicity:
status: New → Fix Committed
Celia Wang (ziyiwang)
Changed in charm-duplicity:
status: Fix Committed → Fix Released
milestone: none → 21.01
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.