I'm trying to set up the de-duplicating backup program obnam so that it backups encrypted chunks on a remote server (raspberry pi B3 through ssh with USB hard drive) but can't get it even starting to work; already at first invocation (when it wants to add the <local_user>
as a client) it exits with:
$ obnam backup ~/.obnam.conf
adding clientERROR: gpg: can't query passphrase in
batch mode gpg: decryption failed: secret key not available
(After which obnam's lock file needs to be manually removed, but that's another story.)
The client is a Fedora 18 VM in Qubes-OS with (hopefully) gpg-agent configured correctly as per the man page with
~/.bashrc containing:
GPG_TTY=$(tty)
export GPG_TTY
#
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
fi
and with
~/.bash_profile containing:
eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")
All according to gpg-agent's man file. I can see that 'it works' when the VM is restarted as the .gpg-agent-info file actually exists, the variables (GPG_TTY, GPG_AGENT_INFO, SSH_AUTH_SOCK, SSH_AGENT_PID) are set, and they are exported and can be echoed to the terminal.
The obnam configuration file contains:
repository = sftp://<remote_user>@<rmeote_IP_address>/home/<remote_user>/backups/obnam-repository/
encrypt-with = APENHEUL
after making sure both secret and public keys with Key-ID APENHEUL actually exist.
The versions of the programs used are:
gpg-agent (GnuPG) 2.0.22
libgcrypt 1.5.3
gpg (GnuPG) 1.4.16
obnam --version: 1.5
OpenSSH_6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013