0

Hope all is well.

I am setting up mu4e on emacs and I got but when I try to send an email I cant because my .authinfo.gpg is not being decrypted. it says that it cant find the key.

But I remember trying to encrypt an .authinfo file within emacs but couldnt so I used my terminal and I did this:

gpg -c .authinfo

And I entered the passphrase.

So now I want to use this passphrase to decrypt my file but I dont know how I can get emacs to see this passphrase and How to configure.

I have tried searching through google to find my answer but cant find it.

thanks

chez93
  • 1
  • Does it work with magic comment like `;; -*- epa-file-encrypt-to: nil -*-`? [Emacs manual: 3.6 Encrypting/decrypting gpg files](https://www.gnu.org/software/emacs/manual/html_node/epa/Encrypting_002fdecrypting-gpg-files.html#index-epa_002dfile_002dselect_002dkeys-43) – roomworoof Apr 10 '23 at 01:31

1 Answers1

0

Ok so I was able to send my email with mu4e and this is how I made it work.

In my .authinfo.gpg file added this to the top of the file:

# -*- epa-file-encrypt-to: ("kramer@example.com") -*-

But I also had to generate a gpg key and once you do emacs is smart to know the key.

to generate the key do this:

gpg --gen-key
gpg --armor --export-secret-keys <email> > mykey.asc

and to encrypt your file - in my case .authinfo do:

gpg -c file1.txt
chez93
  • 1