I am using an S3 / duplicity back up script, save my files. It has been working just fine, until I added a second gpg key. Then all hell broke loose. I tried to deal with two keys, then I deleted the second key. Then I remove / purged gpg altogether and started with a fresh start.
I created a new key and this is the response I get.
GPGError: GPG Failed, see log below: ===== Begin GnuPG log ===== gpg: no default secret key: secret key not available gpg: [stdin]: sign+encrypt failed: secret key not available ===== End GnuPG log =====
` Here is my back up script (but I don't think that is the problem)
#!/bin/bash # Make GPG explicitly aware of our private key, # since we'll be running this via cron as root HOME="/" SOURCE="/" TARGET=s3+http://xxxx/xxxxx/ LOGFILE=/home/bege/.duplicity/desktop.log export HOME=$HOME export SOURCE=$SOURCE export TARGET=$TARGET export LOGFILE=$LOGFILE # Load our credentials source "/home/bege/Desktop/.credentials.conf" export PASSPHRASE export AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY GPG_KEY='7E4B6B9B' duplicity \ --verbosity notice \ --s3-use-new-style \ --volsize=1000 \ --encrypt-key="$GPG_KEY" \ --sign-key="$GPG_KEY" \ --full-if-older-than 7D \ --asynchronous-upload \ --log-file "/home/bege/.duplicity/log.log" \ --include=/home/bege/Desktop/charts \ --exclude=/** \ --progress \ $SOURCE \ $TARGET > $LOGFILE unset PASSPHRASE unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY
Here are the details of my keys:
/home/bege/.gnupg/pubring.gpg ----------------------------- pub 2048R/7E4B6B9B 2015-07-15 uid Chad H <firstname.lastname@example.org> /home/bege/.gnupg/secring.gpg ----------------------------- sec 2048R/7E4B6B9B 2015-07-15 uid Chad H <email@example.com>
I have also modified the
conf file to make this key the default one. I have spent far too much time on this but I'm obssessed for some lame reason, I'm at my wits end, thanks in advance.