title: How do you verify an encrypted and signed file with gpg?
body: <p>I am trying to get a better understanding of what is going on with gpg. </p>
  
  <p>If you have a file and sign it: <code>gpg --sign file.txt</code></p>
  
  <p>you can verify it with: <code>gpg --verify file.txt.gpg</code></p>
  
  <p>when you get a successful output: <code>gpg: Signature made...</code></p>
  
  <p>But when you sign AND encrypt a file: <code>gpg --encrypt --sign -r test@email.com file.txt</code></p>
  
  <p>and then run <code>--verify</code> on the encrypted file I get: <code>gpg: verify signatures failed: Unexpected error</code></p>
  
  <p>I know that I can just call <code>--decrypt</code> on the file and it will verify and decrypt it, but what if I want to verify only?</p>