Skip to content

GPG Keys, authinfo.gpg, and Emacs passwords (Magit Forge)

Nils Deppe edited this page Apr 16, 2020 · 1 revision

Magit Forge allows accessing PRs, issues, etc. directly from Emacs but requires using auth-sources in Emacs. To have Emacs use an encrypted file (please do this...) the following must be set in the Emacs init file:

(setq auth-sources '((:source "~/.authinfo.gpg")))

You must then create the ~/.authinfo.gpg. This is done simply by opening that file in Emacs. If you already have GPG setup you just need to select your own GPG key (mark it with m in the Emacs interface). Make sure that the permissions for the ~/.authinfo.gpg are 600.

You can add the Magit forge (and other passwords) into the file (see the Magit forge documentation). See here for info on manually creating the GitHub token.

Clone this wiki locally