Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have gpg-agent running with a cached passphrase for an hour or so. I encrypt my email account passwords for offlineimap IMAP sync utility and have the script pass in the passwords by decrypting them from a GPG-encrypted file.

Since I run offlineimap with systemd as it is a cron job, it will naturally pop-up a pinentry program and ask for the password. I was wondering is there a way to programtically confirm if gpg-agent will need a passphrase so I can query for the information, and gracefully exit the systemd/cron job if interactive passphrase input is required.

Has anyone done this before?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.