Can I enter my gpg password just once and unlock all my sub keys (signing, decryption, authentication)?At the moment, I need to enter my gpg password three times (for signing, for decryption, for authentication). This is inconvenient.I tried to come up with a shell script.#!/bin/bashset -xset -eset +o historysigning_key=77BB3C48encryption_key=CE998547tempfile=$(mktemp)echo test > testfileunset passphrase || exit 1read -sp 'Enter password. ' passphrase ; echoexec 3<<<$passphrasegpg2 --no-tty --use-agent --batch --yes --passphrase-fd 3 --sign-with $signing_key --clearsign $tempfilegpg2 --no-tty --use-agent --verify $tempfile.ascgpg2 --no-tty --use-agent --yes --armor --recipient $encryption_key --encrypt $tempfileexec 3<<<$passphrasegpg2 --no-tty --use-agent --batch --decrypt --passphrase-fd 3 $tempfile.ascBut unfortunately, that way passwords gnupg-agent doesn't cache the password. Can this be fixed?System information:When not using that shell script, I have no issues with gnupg-agent. When I manually sign / decrypt a file in shell, pinentry asks for password twice, then caches it until reboot.Using Debian Wheezy.gpg version:dpkg -l | grep gnupgii  gnupg                                        1.4.12-7+deb7u3                    i386         GNU privacy guard - a free PGP replacementii  gnupg-agent                                  2.0.22-3                           i386         GNU privacy guard - password agentii  gnupg-curl                                   1.4.12-7+deb7u3                    i386         GNU privacy guard - a free PGP replacement (cURL)ii  gnupg2                                       2.0.22-3                           i386         GNU privacy guard - a free PGP replacement (new v2.x)I've asked on gnupg-users mailing list a while ago, but no reply.Perhaps this answer can help? Perhaps gpg-connect-agent is required?
Cache all gpg subkey passwords at once? Prevent need for multiple gpg password entry?
shell script;gpg;gpg agent