Say you want to symmetrically encrypt a file with GPG:
gpg -c foobar.txt
You have already decided on a nice long passphrase and have it copied to the keyboard, when a dialog window pops up asking for the passphrase, but won't allow it to be pasted in.

The fix is simple:
  1. Open ~/.gnupg/gpg.conf in your favorite editor
  2. Comment the use-agent line (prefix it with #)
  3. Kill off the gpg-agent service (sudo killall -9 gpg-agent)

Now you will be prompted at the shell for the passphrase whenever you use gpg -c. This also helps for scripts.