distributions icon indicating copy to clipboard operation
distributions copied to clipboard

GPG error during install

Open EvertEt opened this issue 5 years ago • 11 comments

We use setup_11.x on an Ubuntu 18.04 VM (hosted on Azure). When this machine deploys, we call the following code from a bash script:

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs

Sometimes the first script fails with the following output

## Installing the NodeSource Node.js 11.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Reading package lists...

## Confirming "bionic" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting

This behaviour is not always the case as sometimes it does succeed: (log snippet from other machine)

Reading package lists...
## Confirming "bionic" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
## Creating apt sources list file for the NodeSource Node.js 11.x repo...

I am not sure the error is related to the setup_11.x script but any help is appreciated! Thanks

EvertEt avatar Nov 27 '19 10:11 EvertEt

After several attempts I was not able to replicate the issue @EvertEt, is this still an issue?

igsu avatar Dec 20 '19 20:12 igsu

It has not appeared for a while but we have not installed a lot of new machines so it is hard to say.

EvertEt avatar Dec 20 '19 20:12 EvertEt

It does still appear yes. Recent extract:

## Installing the NodeSource Node.js 11.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:5 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists...

## Confirming "bionic" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_11.x/dists/bionic/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  grub-pc-bin libdumbnet1 linux-headers-4.15.0-72
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libc-ares2 libhttp-parser2.7.1 nodejs-doc
The following NEW packages will be installed:
  libc-ares2 libhttp-parser2.7.1 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,606 kB of archives.
After this operation, 24.7 MB of additional disk space will be used.

EvertEt avatar Jan 07 '20 08:01 EvertEt

Try killing the gpg agent https://stackoverflow.com/a/47056403/4446318

SuperSandro2000 avatar Jan 07 '20 09:01 SuperSandro2000

Try killing the gpg agent stackoverflow.com/a/47056403/4446318

Tried all those suggestions, but none of them made any difference in my case. Still getting the IPC connect call failed error every time I try to add the Nodesource gpg key.

image

batjko avatar Jun 11 '20 21:06 batjko

Problem persists on WSL Ubuntu 20.04 LTS:

## Confirming "focal" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/focal/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting

What should I do to fix this?

thany avatar Sep 03 '20 09:09 thany

Having the same issue. No answer to be found anywhere except for deleting v20 and downgrading to ubuntu 18.. but first comment says he's using v18.. so there is no hope?

ginnerzapata avatar Sep 05 '20 16:09 ginnerzapata

I get this issue installing on a raspberry pi, inside Docker:

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
Error executing command, exiting
The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_15.x | bash -       && apt-get install -y nodejs       && npm install -g yarn' returned a non-zero code: 1

antony avatar Mar 01 '21 15:03 antony

Having the same Issue running Ubuntu 20.04 Docker Image:

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

## Installing the NodeSource Node.js 16.x repo...


## Populating apt-get cache...

+ apt-get update
Get:1 https://deb.nodesource.com/node_15.x focal InRelease [4583 B]                                                                                     
Err:1 https://deb.nodesource.com/node_15.x focal InRelease                                                                                              
  At least one invalid signature was encountered.
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
  At least one invalid signature was encountered.
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  At least one invalid signature was encountered.
Err:4 http://security.ubuntu.com/ubuntu focal-security InRelease
  At least one invalid signature was encountered.
Err:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: https://deb.nodesource.com/node_15.x focal InRelease: At least one invalid signature was encountered.
E: The repository 'https://deb.nodesource.com/node_15.x focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: At least one invalid signature was encountered.
Error executing command, exiting

mzlumin avatar May 20 '21 16:05 mzlumin

Running into a GPG issue NO_PUBKEY on Ubuntu 18.04 LTS

.sh commands

curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install -y nodejs

Output

Reading package lists... Done                                                                   
W: GPG error: https://deb.nodesource.com/node_14.x bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
E: The repository 'https://deb.nodesource.com/node_14.x bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting

Update: I also tried this to no avail curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -

bix6 avatar Jun 25 '21 19:06 bix6

Possible solution is to correct file permissions

koloboxer avatar Aug 24 '21 22:08 koloboxer

thanks for the possible solution @koloboxer

JesusPaz avatar Jan 02 '23 19:01 JesusPaz