Sometimes you want to encrypt a file that contains sensitive information like API keys. One way to encrypt such a file is to use a symmetric cipher:

> gpg --output secrets.yml.gpg --symmetric secrets.yml
Enter passphrase:

After entering and confirming a passphrase, you will now have an encrypted file that you can decrypt at any time. This technique might be useful if you want to check in the encrypted file into your version control system, for example.

To learn more about encrypting and decrypting files, including how to use public-key cryptography to share encrypted files, check out The GNU Privacy Handbook.