emacs with gpg2

Table of Contents


A quick start guide in using emacs with gpg2

Setup GPG

  • Fastest way is using GPG Tools for Mac

Create your gpg keys

Enable GPG in your emacs file

Add the following to your init.el

(require 'epa-file)
(epa-file-enable)
;; So emacs can find the gpg executable
;; Might move this to begining if other tools need this path 
(add-to-list 'exec-path "/usr/local/bin")
(setq epg-gpg-program "/usr/local/bin/gpg")

Encrypt/Decrypt files automatically

Create a file with the extension .gpg

Add a line on top of your gpg file

Save the file

References