Running gpg-agent and caching the passphrase
Hi, I'm trying to get gpg-agent running under 8.2 using the same setup I've had on my linux box. The agent is started via .xinitrc: export GPG_TTY=$(tty) if [ -z `pgrep gpg-agent` ]; then eval $(gpg-agent --daemon --write-env-file ${HOME}/.gpg-agent-info \ --log-file ${HOME}/.gnupg/gpg-agent.log) fi The agent is up and running (checked via ps) and the option use-agent is set in gpg.conf. As pinentry I installed pinentry-gtk2. If I try to sign or decrypt something the pinentry window comes up and asks for my passphrase. So far so good but I want it to cache my passphrase for some time. My ~/.gnupg/gpg-agent.conf: default-cache-ttl = 3600 But no matter what option I set the passphrase is not cached and there is no error message in the logs. I don't know if this is the right place to ask but the same setup was running on my linux box without problems so I guess this might be bsd related. Regards, Jens P.S.: I use ssh-agent also and it works without problems. While using gpg-agent with the ssh option ask for the passphrase every time the key is used. -- 21. Wonnemond 2011, 08:24 Homepage : http://www.jan0sch.de A crow perched himself on a telephone wire. He was going to make a long-distance caw. pgpTzxhv4Z7cG.pgp Description: PGP signature
Re: Running gpg-agent and caching the passphrase
On Sat, 21 May 2011 08:34:21 +0200 Jens Jahnke jan0...@gmx.net wrote: But no matter what option I set the passphrase is not cached and there is no error message in the logs. I don't know if this is the right place to ask but the same setup was running on my linux box without problems so I guess this might be bsd related. Have you considered to use (security/)keychain? It's very handy for the purpose. It's invoked by putting something like: eval `keychain --eval id_rsa your_gpg_key` in e.g. your .zshrc. Sincerely, Gour -- “In the material world, conceptions of good and bad are all mental speculations…” (Sri Caitanya Mahaprabhu) http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
Re: Running gpg-agent and caching the passphrase
On Sat, May 21, 2011 at 08:34:21AM +0200, Jens Jahnke wrote: Hi, I'm trying to get gpg-agent running under 8.2 using the same setup I've had on my linux box. The agent is started via .xinitrc: export GPG_TTY=$(tty) if [ -z `pgrep gpg-agent` ]; then eval $(gpg-agent --daemon --write-env-file ${HOME}/.gpg-agent-info \ --log-file ${HOME}/.gnupg/gpg-agent.log) fi The agent is up and running (checked via ps) and the option use-agent is set in gpg.conf. As pinentry I installed pinentry-gtk2. If I try to sign or decrypt something the pinentry window comes up and asks for my passphrase. So far so good but I want it to cache my passphrase for some time. My ~/.gnupg/gpg-agent.conf: default-cache-ttl = 3600 Try: default-cache-ttl 3600 (no equals sign) But no matter what option I set the passphrase is not cached and there is no error message in the logs. I don't know if this is the right place to ask but the same setup was running on my linux box without problems so I guess this might be bsd related. Regards, Jens P.S.: I use ssh-agent also and it works without problems. While using gpg-agent with the ssh option ask for the passphrase every time the key is used. Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html pgpqEJsm1Lrgk.pgp Description: PGP signature
Re: Running gpg-agent and caching the passphrase
On Sat, 21 May 2011 09:02:27 +0100 Frank Shute fr...@shute.org.uk wrote: FS Try: FS FS default-cache-ttl 3600 FS FS (no equals sign) Woah, stupid me. Thanks for the tip. It works now. =) Regards, Jens -- 21. Wonnemond 2011, 12:07 Homepage : http://www.jan0sch.de To be sure of hitting the target, shoot first and, whatever you hit, call it the target. pgpqz8RiWHxOA.pgp Description: PGP signature