Trying to configure gpg in a way that I enter passphrase only once, and it will work for the whole session.
However, this is what I'm getting:
$ pgrep gpg-agent | wc
0 0 0
$ gpg-agent --daemon
gpg-agent: a gpg-agent is already running - not starting a new one
$ pgrep gpg-agent
26401
I.e., gpg-agent --daemon will start a gpg-agent but forgot it has started one right afterward, and blocks itself. Tried many times after gpgconf --kill gpg-agent, or
kill `pgrep gpg-agent`
and the results are always the same.
What's wrong?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
installed packages with KW of gpg:
gpg_2.2.4-1ubuntu1.2
gpg-agent_2.2.4-1ubuntu1.2
gpg-wks-client_2.2.4-1ubuntu1.2
gpg-wks-server_2.2.4-1ubuntu1.2
gpgconf_2.2.4-1ubuntu1.2
gpgsm_2.2.4-1ubuntu1.2
gpgv_2.2.4-1ubuntu1.2