25

trying to migrate our base image to the stable Ubuntu 18.04, when we try to add our gpg key, getting this error:

root@77ff14f29cab:/# apt-key add apt-key.gpg 
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
Rui Yang
  • 657
  • 1
  • 6
  • 16

1 Answers1

59

You are missing the gpg-agent package, most likely:

gpg-agent/testing,unstable,now 2.2.5-1 amd64 [installed,automatic]
  GNU privacy guard - cryptographic agent

The command you should run is:

apt install gpg-agent
vvvvv
  • 25,404
  • 19
  • 49
  • 81