# gpg / gpg-agent -- Can't connect to /root/.gnupg/S.gpg-agent

## jrtayloriv

I am having trouble with gpg & gpg-agent. I ran

```
gpg --gen-key
```

And right after I input my name and email, it crashes with the following message:

 *Quote:*   

> 
> 
> Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
> 
> You need a Passphrase to protect your secret key.
> ...

 

Any idea how I might fix this?

Thanks,

jrtayloriv

----------

## jrtayloriv

I'm not sure why, but running this:

```

eval 'gpg-agent --daemon'

```

and then adding this into a file called /root/.gnupg/gpg-agent.conf:

```

pinentry-program /usr/bin/pinentry

no-grab

default-cache-ttl 1800

```

Seemed to work OK. I used touch to create a file called /root/.gnupg/S.gpg-agent.

I still get an error saying:

```

can't connect to `/root/.gnupg/S.gpg-agent': Connection refused

```

But it generated a key for me...although I'm a bit uncomfortable having this program just "kind of" working.

Any suggestions as to what might be causing this?

----------

## noisebleed

Hi. Used

```

# eval 'gpg-agent --daemon --use-standard-socket' 

```

and it created the socket file:

```
# ls -la S*

# srwxr-xr-x 1 root root    0 2008-01-21 19:08 S.gpg-agent

```

Have you already solved your problem?

Just one question: why the touch thing?

----------

## swimmer

What I do not understand is that you have to run this command manually?!?! Shouldn't this happen automatically?

Greetz

swimmer

----------

