patchman icon indicating copy to clipboard operation
patchman copied to clipboard

GPG key not found (ubuntu)

Open sbrooks-chroma opened this issue 2 years ago • 9 comments

I'm unable to install patchman on new Ubuntu servers because the gpg keyring isn't found at https://keyserver.ubuntu.com/

sbrooks-chroma avatar Feb 28 '22 16:02 sbrooks-chroma

Same... on 3/14/2022 Fresh Ubuntu 20.04 install. apt-key adv -v --keyserver keyserver.ubuntu.com --recv-keys 0412F522 Executing: /tmp/apt-key-gpghome.PJwFtctWxu/gpg.1.sh -v --keyserver keyserver.ubuntu.com --recv-keys 0412F522 gpg: no running Dirmngr - starting '/usr/bin/dirmngr' gpg: waiting for the dirmngr to come up ... (5s) gpg: connection to dirmngr established gpg: keyserver receive failed: Connection timed out

ebman avatar Mar 14 '22 22:03 ebman

Executing: /tmp/apt-key-gpghome.o6JlpnFpN2/gpg.1.sh -v --keyserver keyserver.ubuntu.com --recv-keys 0412F522
gpg: no running Dirmngr - starting '/usr/bin/dirmngr'
gpg: waiting for the dirmngr to come up ... (5s)
gpg: connection to dirmngr established
gpg: data source: http://162.213.33.8:11371
gpg: armor header: Version: Hockeypuck ~unreleased
gpg: armor header: Comment: Hostname:
gpg: key D30FB02B0412F522: number of dropped non-self-signatures: 10
gpg: pub  rsa4096/D30FB02B0412F522 2013-09-10  Marcus Furlong <[email protected]>
gpg: key D30FB02B0412F522: public key "Marcus Furlong <[email protected]>" imported
gpg: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg: waiting for the agent to come up ... (5s)
gpg: connection to agent established
gpg: Total number processed: 1
gpg:               imported: 1```

furlongm avatar Mar 14 '22 22:03 furlongm

Is it possible there is a firewall blocking your connection?

furlongm avatar Mar 14 '22 22:03 furlongm

Thx- I tested on a Mint19 OS on the same LAN and it worked no issue. Must be something with the new Ubuntu 20.04 install. This is from Mint 19 apt-key adv -v --keyserver keyserver.ubuntu.com --recv-keys D30FB02B0412F522 Executing: /tmp/apt-key-gpghome.d9KjqW8GBL/gpg.1.sh -v --keyserver keyserver.ubuntu.com --recv-keys D30FB02B0412F522 gpg: no running Dirmngr - starting '/usr/bin/dirmngr' gpg: waiting for the dirmngr to come up ... (5s) gpg: connection to dirmngr established gpg: data source: http://162.213.33.8:11371 gpg: armor header: Comment: Hostname: gpg: armor header: Version: Hockeypuck ~unreleased gpg: key D30FB02B0412F522: number of dropped non-self-signatures: 10 gpg: pub rsa4096/D30FB02B0412F522 2013-09-10 Marcus Furlong <[email protected]> gpg: key D30FB02B0412F522: public key "Marcus Furlong <[email protected]>" imported gpg: no running gpg-agent - starting '/usr/bin/gpg-agent' gpg: waiting for the agent to come up ... (5s) gpg: connection to agent established gpg: Total number processed: 1 gpg: imported: 1

ebman avatar Mar 14 '22 23:03 ebman

UPDATE: got it to go on Ubuntu 20.04 fresh install.

  1. add 8.8.8.8 to etc/resolv.conf
  2. stop/start systemd-resolved.service
  3. added hkp:// and port :80 to --keyserver

This worked: apt-key adv -v --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D30FB02B0412F522

Executing: /tmp/apt-key-gpghome.keznepscEl/gpg.1.sh -v --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D30FB02B0412F522 gpg: no running Dirmngr - starting '/usr/bin/dirmngr' gpg: waiting for the dirmngr to come up ... (5s) gpg: connection to dirmngr established gpg: data source: http://162.213.33.8:80 gpg: armor header: Comment: Hostname: gpg: armor header: Version: Hockeypuck ~unreleased gpg: key D30FB02B0412F522: number of dropped non-self-signatures: 10 gpg: pub rsa4096/D30FB02B0412F522 2013-09-10 Marcus Furlong [email protected] gpg: key D30FB02B0412F522: public key "Marcus Furlong [email protected]" imported gpg: no running gpg-agent - starting '/usr/bin/gpg-agent' gpg: waiting for the agent to come up ... (5s) gpg: connection to agent established gpg: Total number processed: 1 gpg: imported: 1

ebman avatar Mar 14 '22 23:03 ebman

Anyone have a different workaround? Or better troubleshooting steps?

dandunckelman avatar Apr 06 '22 22:04 dandunckelman

I was told that it works after installing the ca-certificates package. Maybe that should be added to https://github.com/furlongm/patchman/blob/master/INSTALL.md#ubuntu-2004-focal

dandunckelman avatar Apr 07 '22 15:04 dandunckelman

We are facing this issue recently. Please verify: sudo -E apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0412F522 Executing: /tmp/apt-key-gpghome.grNA43mCGt/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 0412F522 gpg: keyserver receive failed: Connection timed out

No firewall, other stuff working: curl -v keyserver.ubuntu.com

  • Uses proxy env variable http_proxy == 'http://xxx.xxx.monash.edu.au:3128'
  • Trying 172.16.xxx.xxx:3128...
  • TCP_NODELAY set
  • Connected to xxxx.xxx.monash.edu.au (172.16.xxx.xxx) port 3128 (#0)

GET http://keyserver.ubuntu.com/ HTTP/1.1 Host: keyserver.ubuntu.com User-Agent: curl/7.68.0 Accept: / Proxy-Connection: Keep-Alive

  • Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Tue, 07 Jun 2022 07:06:21 GMT < Server: Hockeypuck/~unreleased < Accept-Ranges: bytes < Content-Length: 8014 < Content-Type: text/html; charset=utf-8 < Last-Modified: Sat, 04 Jun 2022 07:43:07 GMT < Vary: Accept-Encoding < X-Cache: MISS from squid1-01 < X-Cache-Lookup: MISS from squid1-01:3128 < Via: 1.1 squid1-01 (squid/3.5.27) < Connection: keep-alive <

Thanks.

shahaan avatar Jun 07 '22 07:06 shahaan

Can you @furlongm Store the Key on the Repository?

Similar how salt does it: https://repo.saltproject.io/#ubuntu

ckbaker10 avatar Aug 09 '22 11:08 ckbaker10