35
votes
Accepted
How to automatically sign commits with magit?
In Magit commits are created using the committing popup (c). That popup would therefore be a good place to start looking for gpg support. If you do that, then you will find this:
=S Sign using gpg (--...
30
votes
Accepted
Enabling minibuffer pinentry with Emacs 25 and GnuPG 2.1 on Ubuntu Xenial
You also have to
Explicitely enable loopback mode for pinentry in your
gpg-agent.conf.
Configure epa to use loopback for pinentry.
Start the pinentry server in emacs,
1. Enable Emacs pinentry and ...
24
votes
How to automatically sign commits with magit?
Try this in your $HOME/.gitconfig or your .git/config
[user]
email = YourEmail
name = YourName
signingkey = XXXXXXXX
[commit]
gpgsign = true
Then just commit as usual.
22
votes
Unable to decrypt .gpg file using emacs but command line gpg works
You do not say which OS nor version of emacs you have.
I solved yesterday exactly the same problem in OSX and emacs 25.1 using information from this link: http://colinxy.github.io/software-...
11
votes
Accepted
How to force Emacs or pinentry to forget wrong GPG password?
Pinentry is only an interface, it doesn't keep any passphrase or permission, and neither does Emacs. It's GPG-agent that manages the ropes. For example, if the time expires or the process dies, you'll ...
9
votes
Accepted
Emacs failing to save encrypted file
Downgrade to GnuPG 2.4.0 should help.
There is an issue registered in gnupg and numerous reports in other resources:
https://dev.gnupg.org/T6481
It is still not fixed as of GnuPG 2.4.3, unfortunately.
7
votes
Accepted
How do I remove passwords and usernames from my emacs .init file?
Took quite a bit of trial and error, but here was the eventual solution:
Create .authinfo.gpg file in a directory of your choice
Add the following to the .authinfo.gpg file (for IRC login)
machine ...
6
votes
gpg password entry in minibuffer, not popup
Have you tried installing gpg version greater than 2.1, and then (setq epa-pinentry-mode 'loopback)? This should prompt for the password in the minibuffer.
Edit:
epa-pinentry-mode has been marked ...
5
votes
How to configure EasyPG with Gpg4win or any other Windows GPG version?
I had this problem and got it to work. Needed to spelunk through the code in epg.el and epg-config.el to determine what to fiddle with. This is what worked for me:
(custom-set-variables
'(epg-gpg-...
5
votes
How to get gpg-agent to cache the passphrases I enter when reading/saving *.gpg files?
https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html#Agent-Options
In this documentation, the options you might be interested in
default-cache-ttl n,
Set the time a cache entry is ...
5
votes
Enabling minibuffer pinentry with Emacs 25 and GnuPG 2.1 on Ubuntu Xenial
For setups with GnuPG >= 2.1, pinentry package is not needed anymore.
Quote from the Emacs News.26 file:
** The pinentry.el library has been removed.
That package (and the corresponding change in ...
5
votes
Accepted
gpg fails to find key to elpa archive
I encountered this issue. I solved it using the following steps in order:
Installing Gpg4win
Make sure that the folder c:/Progra~2/GnuPG/bin is on your path before any other installed versions of the ...
4
votes
gpg fails to find key to elpa archive
I solved this issue using above solutions in tandem.
I changed the package-gnupghome-dir as suggested. This got me partway there. I then got a different error, Can't check signature: No public key. So,...
4
votes
Cannot run melpa package refresh due to gpg errors
I had the same problem. It seems like gpg is not able to locate a key server.
To fix it, in the ~/.emacs.d/elpa/gnupg directory, create a file named gpg.conf with the following line:
keyserver hkp://...
3
votes
Using auth-source with magit and bitbucket
The prompt I see without any configuration is:
Password for 'https://[email protected]':
this corresponds to the used remote url:
https://tarsius@bitbucket.org/tarsius/foobar.git
I then added ...
3
votes
Accepted
Cache symmetric encryption passphrase for a session or some amount of time
I cannot comment on Emacs 24, but here's how I solved this for Emacs 25:
By default epa in Emacs 25 uses gpg2 (GnuPG 2.x). According to the Epa manual, caching with gpg2 requires gpg-agent.
For some ...
3
votes
Accepted
how to use minibuffer instead of pop-up window for GPG files?
I am moving my comment to an answer explaining how pinentry-emacs works because of formatting
pinentry-emacs stops the window from popping up that asks for your password and insteads asks for your ...
3
votes
Accepted
How to GPG-sign a commit when reverting in Magit?
I've just added --gpg-sign to the revert popup.
Since it sounds like you are signing all commits anyway, you might also just set the Git variable commit.gpgSign.
And you can always add your own ...
3
votes
GPG No Public Key
I had the same problem, on msys2, with the mingw64 version of emacs, which is 27.1, incidentally.
The problem I've found comes from emacs's package.el not agreeing (in msys2's context) with gpg on ...
2
votes
Accepted
Do not automatically sign emails directed to mailing lists and such
The following will prevent messages to email addresses in
blacklist-addresses from invoking mml-secure-message-sign.
(defvar blacklist-addresses nil
"List of email addresses (as strings) to ...

Dan♦
- 32.7k
2
votes
Accepted
Emacs opens gpg file without asking for passphrase
How can you be sure that GNOME is not caching the passphrase? If you are starting emacs in non-terminal mode, and if it is not asking for passphrase, you must have checked the option for "...
2
votes
Accepted
org-crypt key in .init file?
org-crypt-key is the GPG key identifier, normally an email address.
Your GPG secret key resides in the secret ring in your .gnupg directory, and is protected by your passphrase.
From the source code ...
2
votes
Accepted
Include .org.gpg files in org-agenda
Override org-agenda-file-regexp as shown to include .org.gpg files, then set org-agenda-files as usual.
(unless (string-match-p "\\.gpg" org-agenda-file-regexp)
(setq org-agenda-file-regexp
...
2
votes
gpg fails to find key to elpa archive
Emacs' package infrastructure uses its own variable for GPG, package-gnupghome-dir. For me (and, obviously, you here) it failed because Emacs' filename functions don't see the path as an absolute ...
2
votes
How to detect programmatically if content under org-mode headline is encrypted or not before a save or commit?
From the commentary at the beginning of org-crypt.el:
;; 4. To automatically encrypt all necessary entries when saving a
;; file, call `org-crypt-use-before-save-magic' after loading
;; org-...
2
votes
User-friendly setup of Emacs with GPG, mu4e, and mu4e-send-delay
This was intended as a comment, but it's too long, hopefully it will give you some hints.
Right now I don't have a mac to try OSX configs, but this is what I have now:
pinentry:
pinentry-program /...
2
votes
Cannot open .gpg file in emacs after upgrading to 27.1
As Martin mentioned, this is due to a version problem of the gpg binaries RHEL/CENTOS provides. For this to work, you need to convince emacs that your version is acceptable.
Find the .../share/emacs/...
2
votes
Accepted
How to avoid using auth-sources when editing with sudo?
This is the same question as discussed in https://debbugs.gnu.org/46674
In short: Use Tramp 2.5 from GNU ELPA, and apply in your .emacs
(connection-local-set-profile-variables
'remote-without-auth-...
1
vote
Accepted
Encrypt both mail body and attachment with gnus
Turns out
C-c RET C p: mml-secure-encrypt-pgpmime
is the right tool for that.
1
vote
Emacs not prompting for password when opening gpg file
For gpg version < 2, caching can be from emacs or the gpg-agent
To disable caching from emacs, set epa-file-cache-passphrase-for-symmetric-encryption to nil if it is not nil in emacs config file
(...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gpg × 62epa × 12
encryption × 6
authinfo × 6
org-mode × 5
magit × 5
gnus × 5
passwords × 5
pgp × 5
microsoft-windows × 4
mu4e × 4
osx × 3
tramp × 3
git × 3
email × 3
init-file × 2
package-repositories × 2
minibuffer × 2
ssh × 2
emacs27 × 2
org-agenda × 1
package × 1
major-mode × 1
eshell × 1
term × 1