add pinentry for inputing git gpg password
This commit is contained in:
4 files changed
+448
-7
No files matched your search
@@ -0,0 +1,30 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
(require 'lazy-load)
|
||||
(lazy-load-global-keys
|
||||
'(("C-x g" . magit-status))
|
||||
"magit")
|
||||
|
||||
;; gpg config
|
||||
(defun kill-gpg-agent-when-emacs-exit ()
|
||||
"Kill `gpg-agent' for security when Emacs be killed."
|
||||
(when (and (bound-and-true-p epg-gpgconf-program)
|
||||
(executable-find epg-gpgconf-program))
|
||||
(start-process "" nil epg-gpgconf-program "--kill" "gpg-agent")))
|
||||
(add-hook 'kill-emacs-hook #'kill-gpg-agent-when-emacs-exit)
|
||||
|
||||
(setq epg-pinentry-mode 'loopback)
|
||||
|
||||
(with-eval-after-load 'magit
|
||||
;; (require 'forge)
|
||||
|
||||
;; pinentry for prompting password of gpg when sign git commit
|
||||
(condition-case nil
|
||||
(progn
|
||||
(require 'pinentry)
|
||||
(pinentry-start))
|
||||
(error nil))
|
||||
|
||||
(setq magit-revision-show-gravatars
|
||||
'("^Author: " . "^Commit: ")))
|
||||
|
||||
(provide 'init-git)
|
||||
Reference in new issue
Block a user