yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.43k stars 2.72k forks source link

Apt-get unable to install Yarn - key signing error #7024

Open dragoonis opened 5 years ago

dragoonis commented 5 years ago

Do you want to request a feature or report a bug? BUG

What is the current behavior? I'm in my Dockerfile, and I'm doing this: https://gist.github.com/dragoonis/3994b0811a3457cec4cd2ad869d0e07e#file-dockerfile-L11-L21

    # Yarn APT Repo
   curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
   echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
   apt-get update -y && \
   apt install -y --no-install-recommends yarn && \

This is now intermittently passing and failing with the following output:

   RUN . /root/.profile &&    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list &&     apt-get update -y &&    apt-get install -y bzip2 &&    nvm install $NODE_VERSION &&    nvm use $NODE_VERSION &&    apt-get update -y &&     apt install -y --no-install-recommends yarn &&     yarn --version &&     yarn global add npm@5.7.1 bower@1.8.2 grunt-cli@1.2.0 karma-cli@1.0.0 gulp@3.9.1

[WARNING]: Empty continuation lines will become errors in a future release.

Step 1/7 : FROM registry.service.opg.digital/opg-php-fpm-71-ppa-1604

 ---> 837968a92426

Step 2/7 : ENV NODE_VERSION=6.11.4     NVM_DIR=/opt/nvm

 ---> Using cache

 ---> a419207b1768

Step 3/7 : RUN curl -L https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | sh

 ---> Using cache

 ---> 37286c316b4b

Step 4/7 : RUN . /root/.profile &&    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list &&     apt-get update -y &&    apt-get install -y bzip2 &&    nvm install $NODE_VERSION &&    nvm use $NODE_VERSION &&    apt-get update -y &&     apt install -y --no-install-recommends yarn &&     yarn --version &&     yarn global add npm@5.7.1 bower@1.8.2 grunt-cli@1.2.0 karma-cli@1.0.0 gulp@3.9.1

 ---> Running in 0581c09e8106

mesg: ttyname failed: Inappropriate ioctl for device

OK

deb https://dl.yarnpkg.com/debian/ stable main

Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease

Couldn't create tempfiles for splitting up /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_xenial_InReleaseErr:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Hit:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease

Get:3 https://dl.yarnpkg.com/debian stable InRelease [13.3 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/apt.postgresql.org_pub_repos_apt_dists_xenial-pgdg_InReleaseErr:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/dl.yarnpkg.com_debian_dists_stable_InReleaseIgn:3 https://dl.yarnpkg.com/debian stable InRelease

Get:4 https://dl.yarnpkg.com/debian stable/main amd64 Packages [8,346 B]

Get:5 https://dl.yarnpkg.com/debian stable/main all Packages [8,346 B]

Hit:6 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease

Couldn't create tempfiles for splitting up /var/lib/apt/lists/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial_InReleaseErr:6 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:7 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-updates_InReleaseErr:7 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:8 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease [109 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-security_InReleaseErr:8 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:9 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease [260 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-proposed_InReleaseErr:9 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Fetched 509 kB in 0s (534 kB/s)

Reading package lists...

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-proposed/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Some index files failed to download. They have been ignored, or old ones used instead.

Reading package lists...

Building dependency tree...

Reading state information...

Suggested packages:

  bzip2-doc

The following NEW packages will be installed

  bzip2

0 to upgrade, 1 to newly install, 0 to remove and 38 not to upgrade.

Need to get 32.7 kB of archives.

After this operation, 117 kB of additional disk space will be used.

Get:1 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 bzip2 amd64 1.0.6-8 [32.7 kB]

Fetched 32.7 kB in 0s (190 kB/s)

Selecting previously unselected package bzip2.

(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 18127 files and directories currently installed.)

Preparing to unpack .../bzip2_1.0.6-8_amd64.deb ...

Unpacking bzip2 (1.0.6-8) ...

Setting up bzip2 (1.0.6-8) ...

Downloading https://nodejs.org/dist/v6.11.4/node-v6.11.4-linux-x64.tar.gz...

                                                                           0.0%
                                                                           0.7%
##                                                                         3.3%
#########                                                                 13.1%
########################                                                  33.9%
#####################################                                     51.8%
###################################################                       72.0%
################################################################          90.0%
######################################################################## 100.0%

Now using node v6.11.4 (npm v3.10.10)

Creating default alias: default -> 6.11.4 (-> v6.11.4)

Now using node v6.11.4 (npm v3.10.10)

Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease

Couldn't create tempfiles for splitting up /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_xenial_InReleaseErr:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:2 https://dl.yarnpkg.com/debian stable InRelease [13.3 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/dl.yarnpkg.com_debian_dists_stable_InReleaseIgn:2 https://dl.yarnpkg.com/debian stable InRelease

Hit:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease

Couldn't create tempfiles for splitting up /var/lib/apt/lists/apt.postgresql.org_pub_repos_apt_dists_xenial-pgdg_InReleaseErr:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Hit:4 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease

Couldn't create tempfiles for splitting up /var/lib/apt/lists/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial_InReleaseErr:4 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:5 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-updates_InReleaseErr:5 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:6 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease [109 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-security_InReleaseErr:6 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Get:7 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease [260 kB]

Couldn't create tempfiles for splitting up /var/lib/apt/lists/partial/eu-west-1.clouds.archive.ubuntu.com_ubuntu_dists_xenial-proposed_InReleaseErr:7 http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease

  Could not execute 'apt-key' to verify signature (is gnupg installed?)

Fetched 492 kB in 1s (408 kB/s)

Reading package lists...

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-security InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://eu-west-1.clouds.archive.ubuntu.com/ubuntu xenial-proposed InRelease: Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://eu-west-1.clouds.archive.ubuntu.com/ubuntu/dists/xenial-proposed/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  Could not execute 'apt-key' to verify signature (is gnupg installed?)

W: Some index files failed to download. They have been ignored, or old ones used instead.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...

Building dependency tree...

Reading state information...

Recommended packages:

  nodejs

The following NEW packages will be installed

  yarn

0 to upgrade, 1 to newly install, 0 to remove and 38 not to upgrade.

Need to get 835 kB of archives.

After this operation, 4,993 kB of additional disk space will be used.

WARNING: The following packages cannot be authenticated!

  yarn

E: There were unauthenticated packages and -y was used without --allow-unauthenticated

What is the expected behavior? Yarn installs OK

Please mention your node.js, yarn and operating system version. nodejs: 6.11.4 npm 3.10.10 yarn 1.13.0

rawkode commented 5 years ago

@dragoonis It's complaining because gnupg is not installed.

dragoonis commented 5 years ago

@rawkode well 30% of the times it passes, and 70% is fails. so if gnupg wasn't installed, then it would never pass.

EDIT: i installed "gnupg" package, just incase, and it made no difference.

kid1412621 commented 5 years ago

I can install, but I can't update to latest.

Daniel15 commented 5 years ago

Yeah this seems unrelated to Yarn specifically:

Could not execute 'apt-key' to verify signature (is gnupg installed?)

I don't see any issues specifically caused by Yarn in that output.