Duplicity fails with bad session key error

Solution 1:

The author of Deja Dup has published https://wiki.gnome.org/Apps/DejaDup/PassphraseProblems2019 in which he describes possible reasons due to bugs in earlier versions of Deja Dup and bugs in the underlying duplicity.

TL;DR is that you might have entered a wrong password when being prompted. Unfortunately at least earlier versions of duplicity don't check if the passed passphrase equals the one used in past backups.

In my case the most recent backup files were encrypted with a wrong passphrase. Said document provides a command to check that. Thus, I simply deleted those and ran backup again.

Ubuntu 18.04 uses Deja Dup version 37.0 which still contains this bug. According to the document linked above, the bug is fixed as of 39.1.

Solution 2:

probably a to gpg 2.1 upgrade issue as explained here

https://answers.launchpad.net/duplicity/+question/289102
and here
https://answers.launchpad.net/duplicity/+question/288602
with a workaround mentioned here
https://superuser.com/questions/984977/duplicity-restore-failing-no-secret-key

..ede/duply.net