I use a script to decrypt my password for offlineimap, but somehow it's not working anymore ...The file was encrypted with gpg --symmetric passwordFor offlineimap I use this combination.gpg --quiet --batch --no-tty --for-your-eyes-only --decrypt password.gpg On Linux it's working like it should, but on FreeBSD I get the following error:gpg --quiet --batch --no-tty --for-your-eyes-only --decrypt ~/.mail-accounts/xxxxxx/password.gpg  gpg: can't query passphrase inbatch mode gpg: decryption failed: bad keyAm I missing something?gpg --version  gpg (GnuPG) 1.4.19---COPYRIGHT INFO ---  Home: ~/.gnupg Supported algorithms: Pubkey:  RSA, RSA-E, RSA-S, ELG-E,   DSA Cipher: IDEA, 3DES, CAST5, BLOWFISH,  AES, AES192, AES256, TWOFISH,           CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224  Compression: Uncompressed,   ZIP, ZLIB, BZIP2I use the default gpg.conf without any changes.It's not only working in offlineimap, also in my terminal and everywhere. ( on linux it's working)Edit: Link to python file: https://github.com/tarruda/dot-files/blob/master/mail/offlineimap.py ( not me )Same script found on stackexange.Encrypt OfflineIMAP PasswordThe call in offlineimap remotepasseval = decrypt_password(mein-email@gmail.com)The idea behind is, that it's encrypted with symmetric.When offlineimap is starting the python script an pinentry window opens and asks for the pw.But the pinentry window isn't starting like on linux.On linux it is the same version only differ in Minor version.In gpg 1.4.19 also the --batch option is available and has worked before, but i don't know what happens.
Not possible to use batch mode?! FreeBSD gpg 1.4.19
freebsd;gpg
The --batch option was added in gpg v2. Prior to that, in v1, there is a --no-use-agent option which you might need if you're doing scripted operations.That said, I don't understand how you're entering the key at time of decryption. ...? You're using --no-tty (which prevents gpg from asking you anything) but at least according to what you shared with us, you're not giving gpg a passphrase. That's a problem.