help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Transparent encrypt and decrypt token file with gpg2 in Emacs.


From: Hongyi Zhao
Subject: Re: Transparent encrypt and decrypt token file with gpg2 in Emacs.
Date: Thu, 10 Jun 2021 10:19:49 +0800

On Thu, Jun 10, 2021 at 12:06 AM Jean Louis <bugs@gnu.support> wrote:
>
> * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-09 18:28]:
> > Loading /home/werner/DvdMgr/screen2latex.el.git/auth.el.gpg...
> > Decrypting /home/werner/DvdMgr/screen2latex.el.git/auth.el.gpg...done
> > epa-file-insert-file-contents: Opening input file: Can't decrypt, No
> > data (no armored data); No data (expected a packet but did not find
> > one); Exit
> > Mark set [4 times]
>
> Send the file for review.
>
> If it is encrypted, there should be nothing much to worry... ^‿^

If I first store the plain/unencrypted token info into a file, say,
named as auth.el, and then encrypt it outside of Emacs with gpg(2) as
below, the problem will disappear:

$ gpg2 -o auth.el.gpg -e -r hongyi.zhao@gmail.com auth.el
# Then remove the plain version of the token info.
$ rm auth.el

But I still can't figure out how to let Emacs do the above job for me
automatically when the token file is read by Emacs in an unencrypted
format for the first time.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



reply via email to

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