emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EasyPG (epa)] Emacs can't save modified encrypted file


From: Ihor Radchenko
Subject: Re: [EasyPG (epa)] Emacs can't save modified encrypted file
Date: Tue, 02 May 2023 11:57:36 +0000

"Christopher M. Miles" <numbchild@gmail.com> writes:

> I downgrade gnupg, then the problem solved. But the downgrade version is
> very old (gnupg@2.4.1 -> gnupg@2.2.41). I suspend problem is somewhere
> else, like Emacs interaction with GnuPG process.

Do you have any issues decrypting and encrypting files from command
line? If no, what about from M-x shell? If yet no, what if you call gpg
via `start-process'?

> 4. I press =[C-g]= to quit got following stacktrace:
>
> #+begin_example
> Debugger entered--Lisp error: (quit)
>   accept-process-output(#<process epg> 1)

This certainly looks like gpg itself is waiting for something and Emacs
is waiting for gpg...

> When I save modified "=~/.config/emacs/secrets/authinfo.gpg=", got prompt:
>
> #+begin_example
> Untrusted key AEDA8A17BB08B786 Christopher Miles (stardiviner, numbchild) 
> <numbchild@gmail.com>.  Use anyway? (y or n)
> #+end_example

> If I input "n" for prompt:
>
> #+begin_example
> Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt 
> failed" "Unusable public key: B8C4B8E547C32433 (key not tru...")

This reminds me of 
https://orgmode.org/list/2023-01-22T18-32-17@devnull.Karl-Voit.at
CC-ing Karl as he might be interested to join this discussion.

> - [X] find bellowing two key ID belongs where
>
> Untrusted key "AEDA8A17BB08B786" ---> fingerprint 
> "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786" --> my old key
> ((invalid-recipient (reason . 10) (requested . "B8C4B8E547C32433"))) --> 
> "F09F650D7D674819892591401B5DF1C95AE89AC3" --> my current new gnupg key
>
> Question: I don't know why my current gnupg key and old gnupg key are 
> together.
>
> Here is my Emacs EasyPG (epa) config:
>
> #+begin_src emacs-lisp
> (use-package epa
>   ;; force Emacs to use its own internal password prompt instead of an 
> external
>   ;; pinentry program.
>   :preface (setenv "GPG_AGENT_INFO" nil)

I do not use this setting on my side and simply stick to gtk password
prompt.

Not sure if it is of any help, but on my side I used
https://wiki.gentoo.org/wiki/GnuPG for GPG configuration. That wiki
page is rather detailed - you might find some clues.

Also, my gpg config, for reference
https://github.com/yantar92/emacs-config/blob/master/system-config.org#gpg

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]