distributions
distributions copied to clipboard
GPG error during install
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
After several attempts I was not able to replicate the issue @EvertEt, is this still an issue?
It has not appeared for a while but we have not installed a lot of new machines so it is hard to say.
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.
Try killing the gpg agent https://stackoverflow.com/a/47056403/4446318
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.
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?
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?
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
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
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 -
Possible solution is to correct file permissions
thanks for the possible solution @koloboxer