all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1
@ 2017-08-28 15:07 Rainer Thiel
  2017-08-28 20:18 ` Nikolay Kudryavtsev
  2017-08-29 18:59 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Rainer Thiel @ 2017-08-28 15:07 UTC (permalink / raw)
  To: help-gnu-emacs

I had used Emacs to decrypt and encrypt text files transparently for
several years.  Since I use Gnu Emacs 25.2.1 for Windows, I have GPG4WIN
installed.  This had worked for several years.  «Suddenly», I can
neither encrypt nor decrypt .gpg-files because Emacs (or gpg2 when
called from Emcas) cannot find the relevant public and secret keys.

I know that I am not very specific when I say that it «suddenly» does
not work anymore.  But I am not aware I have changed anything in my
configuration (though obviously in some way I am not aware of I must
have done it), and I have no idea where to look.

I only know I still can de/encrypt files using gpg2(.exe) from the
command line, the relevant directory for the executables is in the PATH
environmental variable, and the settings in the epg-customising group
are at their standard values.  Also, it still does work on my notebook
with the same settings (in fact, I regularly mirror the HOME directory
from my desktop computer to my notebook and vice versa).

Does anyone have an idea what might go wrong here or where I should
look?

Many thanks in advance

Rainer
-- 
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1
  2017-08-28 15:07 transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1 Rainer Thiel
@ 2017-08-28 20:18 ` Nikolay Kudryavtsev
  2017-08-29 13:36   ` Rainer Thiel
  2017-08-29 18:59 ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Nikolay Kudryavtsev @ 2017-08-28 20:18 UTC (permalink / raw)
  To: Rainer Thiel, help-gnu-emacs

Hello.

Maybe you've already tried the stuff I'm going to propose, but still 
it's worth to be sure:

Try running "where gpg" from Emacs shell, to see whether you have any 
possible culprits at the top of PATH. For example git carries its own 
gpg, so does msys2, maybe one of them is higher in your path and broken.

After that please see this message about possible gpg config settings 
that may be in your way:

https://lists.gnupg.org/pipermail/gnupg-users/2008-April/033222.html

It's very possible that you have a case like when gpg has its stuff in 
~/.gpg, while it's looking for it in appdata.

-- 
Best Regards,
Nikolay Kudryavtsev




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1
  2017-08-28 20:18 ` Nikolay Kudryavtsev
@ 2017-08-29 13:36   ` Rainer Thiel
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Thiel @ 2017-08-29 13:36 UTC (permalink / raw)
  To: help-gnu-emacs

Thank you, Nikolay,

I think I've got it right, though I am still not sure what had happened.

gpg2 was in the right place, and it did use the keyrings in ~/.gnupg,
but for some reason that escapes me it was not able to find them when
called from emacs.  When I followed the advice from
<https://lists.gnupg.org/pipermail/gnupg-users/2008-April/033222.html>
that you kindly pointed me to, of a sudden gpg2 (called from the command
line), GPA and Kleopatra (key managers provided with Gpg4win) did not
find the keys anymore, either.

Therefore, I uninstalled and re-installed Gpg4win and imported the keys
from a backup.  Since I have done that, everything works as expected
again, with one pleasant side effect:  When trying to open a .gpg-file
from Emacs, I am asked for the pass phrase in the minibuffer instead of
in a Windows™ window.  Which is what I want and failed to achieve
before.

Thanks again and best regards

Rainer

On 2017-08-28, 23:18 +0300, Nikolay Kudryavtsev
<nikolay.kudryavtsev@gmail.com> wrote:

> Hello.
>
> Maybe you've already tried the stuff I'm going to propose, but still
> it's worth to be sure:
>
> Try running "where gpg" from Emacs shell, to see whether you have any
> possible culprits at the top of PATH. For example git carries its own
> gpg, so does msys2, maybe one of them is higher in your path and broken.
>
> After that please see this message about possible gpg config settings
> that may be in your way:
>
> https://lists.gnupg.org/pipermail/gnupg-users/2008-April/033222.html
>
> It's very possible that you have a case like when gpg has its stuff in
> ~/.gpg, while it's looking for it in appdata.

-- 
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1
  2017-08-28 15:07 transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1 Rainer Thiel
  2017-08-28 20:18 ` Nikolay Kudryavtsev
@ 2017-08-29 18:59 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2017-08-29 18:59 UTC (permalink / raw)
  To: help-gnu-emacs

> installed.  This had worked for several years.  «Suddenly», I can
> neither encrypt nor decrypt .gpg-files because Emacs (or gpg2 when
> called from Emcas) cannot find the relevant public and secret keys.

FWIW, the error messages I get tend to all give me the above message
(something about not finding the key), even when in fact the problem is
that the key is there, but it's just become invalid because it's too old.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-29 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28 15:07 transparently decrypting/encrypting gpg files from Gnu Emacs 25.2.1 Rainer Thiel
2017-08-28 20:18 ` Nikolay Kudryavtsev
2017-08-29 13:36   ` Rainer Thiel
2017-08-29 18:59 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.