[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transparent decryption on OSX - SOLVED
From: |
Monroe, Will |
Subject: |
Re: Transparent decryption on OSX - SOLVED |
Date: |
Thu, 07 May 2015 15:52:08 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Hello,
I was able to solve this problem with some help from nice folks on the
#emacs IRC channel.
First, I verified that I didn't have a gpg agent/daemon running the two
commands below. In both cases, I had no information returned.
echo $GPG_AGENT_INFO
echo $GPG_TTY
So I was running gpg version 1.4 with no agent. However, I had both
gpg (1.4) and gpg2 (2.0) on my machine running OSX 10.10. I was
advised that gpg doesn't run gpg-agent by default but that gpg2 did.
So I added the code below to my config:
(if (eq system-type 'gnu/linux)
(setq epg-gpg-program "/usr/bin/gpg2"))
(if (eq system-type 'darwin)
(setq epg-gpg-program "/usr/local/bin/gpg2"))
All this does is identify whether or not I'm using my Linux or OSX
machines and then set the variable for the gpg program to use. With
this I was able to decrypt/encrypt without entering my passphrase each
time.
I'm sure I've left out important details but this seems to be working
fine on both machines. Hope this helps someone.
Will
On 5/7/15 11:41 AM, Monroe, Will wrote:
Hello,
I saw another post today that gave me the courage to ask about how GPG
and Emacs work together (or don't). I am not sure I understand the
process and I hope someone can point me in the right direction.
My objective:
I would like to be able to decrypt files on a machine running Emacs
24.4, OSX 10.10, and GnuPG 1.4.18 without having to enter my gpg
passphrase each time. The files were encrypted on the same machine
using the key [1]"gpgkeyemail@gmail.com".
Context:
I am able to encrypt and decrypt "transparently" (without having to
enter the passphrase) on another machine running Xubuntu 14.04 LTS,
Emacs 24.4, and GnuPG 1.4.16 using a copy of the same keychain that I
use on my OSX machine. However, on the OSX machine, I am only able to
encrypt transparently. Each time I go to decrypt, I am prompted for my
passphrase. I would like to be able to transparently encrypt and
decrypt on my work machine.
The file I'm trying to open, test.org.gpg, has the following line at
the top:
-*- mode:org -*- epa-file-encrypt-to: ([2]"gpgkeyemail@gmail.com") -*-
What I'm doing:
1. Inside Emacs, I attopen the file, test.org.gpg
2. I'm prompted to provide my passphrase for the
[3]"gpgkeyemail@gmail.com" key and I provide it
3. I'm able to open and edit the file
4. When the file closes, it is saved and encrypted successfully
I've done some research but I think my hunches aren't worth exploring
here. The page below looks like it might have what I need but I'm not
sure what questions I should be asking next.
GnuPG - caching passphrases
[4]https://www.gnu.org/software/emacs/manual/html_mono/epa.html#Caching
-Passphrases
Will
References
1. mailto:gpgkeyemail@gmail.com
2. mailto:gpgkeyemail@gmail.com
3. mailto:gpgkeyemail@gmail.com
4.
https://www.gnu.org/software/emacs/manual/html_mono/epa.html#Caching-Passphrases