Skip to content

Instantly share code, notes, and snippets.

@darrik
Created December 10, 2012 18:42
Show Gist options
  • Save darrik/4252416 to your computer and use it in GitHub Desktop.
Save darrik/4252416 to your computer and use it in GitHub Desktop.
Lazy EPA/GPG file loading in Emacs
;; Populate epa-file-passphrase-alist
(load-file (concat (getenv "HOME") "/.secrets.el.gpg"))
(add-to-list 'epa-file-passphrase-alist '("/path/to/file.org.gpg" . "password"))
I got tired of entering passwords for all my gpg encrypted files every time I started Emacs so I came up with this insecure solution.
Installation:
Put (load-file (concat (getenv "HOME") "/.secrets.el.gpg")) somewhere in your emacs init.
Add a (add-to-list 'epa-file-passphrase-alist '("/path/to/file.org.gpg" . "password")) entry for each of the files you want in $HOME/.secrets.el.gpg
@darrik
Copy link
Author

darrik commented Dec 13, 2012

I should probably mention that you might not want to use this for anything with sensitive information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment