11

I have a git repository where some org-mode files live. Some of them have a private nature and the server where the git repository lives can be accessed by some untrusted third party. Thatswhy I want to encrypt the private org files.

What I'd like to achieve is the following: In the beginning the file is encrypted. This can be either a symmetric key with a password or it can also be my GnuPG key. When I open the file, Emacs asks for the passphrase and opens the file (if pw entered correct). I can now work with the org file like with any other org file. When I save or close the file, it should be encrypted again. Also the git commit should be encrypted.

How can I do something like that with GNU/Emacs?

  • 3
    For the Emacs & file encryption part, I guess, you've already been there and there right? – Nsukami _ Jan 10 '15 at 2:54
12

You just need to add ".gpg" at the end of the file name (for example, you could use "private.org.gpg" for an org file), and put at the end

# Local Variables:
# epa-file-encrypt-to: "someone@somwhere.org"
# End:

where someone@somwhere.org identify a gpg key you use for encrypting this file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.