3

I keep ~/.emacs.d/ under version control with git. I used to gitignore the elpa/ directory, but recently started including it in case I ever want to rollback a package upgrade.

I just noticed an untracked directory on my work machine: ~/.emacs.d/elpa/gnupg/. I'm not sure where it came from. I remember trying to set up a gnupg key at some point on this machine, but I don't know if that's the cause.

Should I gitignore it? I don't understand it's role well enough to say for sure.

ivan
  • 1,928
  • 10
  • 20

2 Answers2

2

It's where package.el keeps the keys used to authenticate the packages that it downloads. You don't need to gitignore it, but of course, it might leads to merge conflicts in some cases, so you may choose to gitignore it (it should be auto-created if/when necessary).

Stefan
  • 26,154
  • 3
  • 46
  • 84
0

Well, I'd say it's configurable!

(require 'package)

(setq
 package--init-file-ensured t
 package-user-dir  (expand-file-name "gnupg" "~/.local/emacs/packages"))

;; Emacs >= 26.1
(when (boundp 'package-gnupghome-dir)
  (setq package-gnupghome-dir
         (expand-file-name "gnupg" "~/.local/emacs/gnupg")))

;; Initialize package manager.
(package-initialize)
(unless package-archive-contents (package-refresh-contents))
serghei
  • 272
  • 3
  • 15