title: Decrypt .gpg/.pgp file without a prompt
body: <p>I've decrypted a file successfully using:</p>
  
  <pre><code>gpg --encrypt --recipient user@company.com myfile.txt 
  </code></pre>
  
  <p>If I run the command below, I'm prompted for a passphrase, and decryption works:</p>
  
  <pre><code>gpg --output decrypted_myfile.txt -decrypt myfile.txt.gpg
  </code></pre>
  
  <p>I can't seem to get any form of non-interactive decryption working.  The closest I've come is:</p>
  
  <pre><code>gpg --decrypt --batch --passphrase MYPASSPHRASE myfile.txt.gpg
  </code></pre>
  
  <p>This gives me:</p>
  
  <pre><code>gpg: encrypted with 2048-bit RSA key, ID F6CF3C25, created 2016-03-17
        "Company_20210316 (Incoming Files) &lt;user@company.com&gt;"
  gpg: public key decryption failed: Bad passphrase
  gpg: decryption failed: No secret key
  </code></pre>
  
  <p>Is there a different way to do it?  </p>