View Full Version : Learning how to use gpg-agent

Jeff Sadowski
25th May 2007, 04:29 PM
it seems pointless if it doesn't store passwords.

Ok here is what I have done so far

eval `gpg-agent --daemon`

echo "test message" | gpg --encrypt - >test.encrypted

it asks for a user to send it to
I type in enough to send it to me

cat test.encrypted | gpg --decrypt

It asks me for my password and I type it and I get the message :-)

Ok so far so good

but now is where I'm stuck I try the command again hoping it would remember my password with gpg-agent

cat test.encrypted | gpg --decrypt

it still asks for a password

I then do some reading and find --use-agent option for gpg so I try that

cat test.encrypted | gpg --decrypt --use-agent

and it just fails

It doesn't ask for a password or anything

gpg: cancelled by user
gpg: encrypted with 2048-bit ELG-E key, ID <my id>, created 2007-04-26
<my key details>
gpg: public key decryption failed: bad passphrase
gpg: decryption failed: secret key not available

so what am I doing wrong?

I even tried gpg2

cat test.encrypted | gpg2 --decrypt

it just stalls

You need a passphrase to unlock the secret key for
<my key details>
2048-bit ELG key, ID <my id>, created 2007-04-26 (main key ID <my pub key id>)

Can someone help me please I don't want to type my password all the time.

Jeff Sadowski
25th May 2007, 05:05 PM
ah ha I forgot an important step