Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install k6 from rpm, GPG keys are not correct #2608

Closed
mskec opened this issue Jul 21, 2022 · 12 comments · Fixed by #2614
Closed

Unable to install k6 from rpm, GPG keys are not correct #2608

mskec opened this issue Jul 21, 2022 · 12 comments · Fixed by #2614
Labels
bug documentation-needed A PR which will need a separate PR for documentation

Comments

@mskec
Copy link

mskec commented Jul 21, 2022

Brief summary

I am unable to install k6 following Fedora/CentOS installation instruction.

k6 version

k6-0.39.0-1.x86_64

OS

Amazon Linux

Docker version and image (if applicable)

No response

Steps to reproduce the problem

sudo yum install https://dl.k6.io/rpm/repo.rpm
sudo yum install k6

Expected behaviour

I expect k6 to be installed successfully

Actual behaviour

Installation fails with GPG keys are not correct error.

warning: /var/cache/yum/x86_64/2/k6/packages/k6-v0.39.0-amd64.rpm: Header V4 RSA/SHA512 Signature, key ID b1a69c86: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-k6-io


The GPG keys listed for the "k6" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: k6-0.39.0-1.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-k6-io
@mskec mskec added the bug label Jul 21, 2022
@na--
Copy link
Member

na-- commented Jul 21, 2022

The GPG keys listed for the "k6" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.

Hm, did you perhaps have an old version of k6 (pre v0.32.0) installed on that machine? We used to host the .rpm and .deb packages in BinTray, but we moved to self-hosting when they shut down: https://github.com/grafana/k6/blob/master/release%20notes/v0.32.0.md#move-out-of-bintray

@mskec
Copy link
Author

mskec commented Jul 21, 2022

Hey @na--, thanks for a quick reply. I didn't have an old version installed before, it's a fresh machine.

Here is the full log when I try to install it on another fresh machine k6-install.log

@mstoykov
Copy link
Contributor

I can confirm that this does work on Fedora 36. I even removed and reinstalled everything a couple of times

@mstoykov
Copy link
Contributor

I think this is due to the age of rpm in amazon linux and is mentioned in https://github.com/grafana/k6/pull/1978/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R101 But we likely need to add this to the docs as well

@mstoykov mstoykov added the documentation-needed A PR which will need a separate PR for documentation label Jul 21, 2022
@mstoykov
Copy link
Contributor

@mskec can you confirm that yum install --nogpgcheck k6 works for you?

@mskec
Copy link
Author

mskec commented Jul 21, 2022

@mstoykov it works with that command. It's not ideal, but I got it installed. Thank you

@na--
Copy link
Member

na-- commented Jul 21, 2022

@mskec, can you please share which Amazon Linux version had this problem, so we can update the readme and installation docs?

@mstoykov
Copy link
Contributor

I can confirm that it works on centos 8 (after using this workaround to get yum working)

But even with the latest amazonlinux docker it doesn't work :(

I also can't find any particular information around whether it will be supported soon or not 🤷

@mskec
Copy link
Author

mskec commented Jul 21, 2022

I think it's also the latest one the one I run

$ cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

$ rpm --version
RPM version 4.11.3

@CooperEdmunds
Copy link

CooperEdmunds commented Jan 30, 2024

sudo yum install --nogpgcheck k6 does not work for me.

Machine specs:

$ rpm --version
RPM version 4.11.3
$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

Here's the output:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                          | 3.6 kB  00:00:00     
amzn2extra-docker                                                                                                                   | 2.9 kB  00:00:00     
https://dl.k6.io/rpm/repo.rpm/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.


 One of the configured repositories failed (added from: https://dl.k6.io/rpm/repo.rpm),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=dl.k6.io_rpm_repo.rpm ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable dl.k6.io_rpm_repo.rpm
        or
            subscription-manager repos --disable=dl.k6.io_rpm_repo.rpm

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=dl.k6.io_rpm_repo.rpm.skip_if_unavailable=true

failure: repodata/repomd.xml from dl.k6.io_rpm_repo.rpm: [Errno 256] No more mirrors to try.
https://dl.k6.io/rpm/repo.rpm/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

@olegbespalov
Copy link
Contributor

Hi @CooperEdmunds !

I've tried to reproduce it and wasn't able to do that 🤔

docker run --rm -it amazonlinux:2
bash-4.2# rpm --version
RPM version 4.11.3
bash-4.2# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"
bash-4.2# yum install https://dl.k6.io/rpm/repo.rpm
Loaded plugins: ovl, priorities
repo.rpm                                                                                                                                                                                                                                                   |  10 kB  00:00:00
Examining /var/tmp/yum-root-h_dmru/repo.rpm: k6-rpm-0.0.2-1.noarch
Marking /var/tmp/yum-root-h_dmru/repo.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package k6-rpm.noarch 0:0.0.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================================================================================
 Package                                                           Arch                                                              Version                                                               Repository                                                        Size
==================================================================================================================================================================================================================================================================================
Installing:
 k6-rpm                                                            noarch                                                            0.0.2-1                                                               /repo                                                            5.5 k

Transaction Summary
==================================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 5.5 k
Installed size: 5.5 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : k6-rpm-0.0.2-1.noarch                                                                                                                                                                                                                                          1/1
  Verifying  : k6-rpm-0.0.2-1.noarch                                                                                                                                                                                                                                          1/1

Installed:
  k6-rpm.noarch 0:0.0.2-1

Complete!
bash-4.2# yum install --nogpgcheck k6
Loaded plugins: ovl, priorities
amzn2-core                                                                                                                                                                                                                                                 | 3.6 kB  00:00:00
k6                                                                                                                                                                                                                                                         | 2.9 kB  00:00:00
(1/4): amzn2-core/2/x86_64/group_gz                                                                                                                                                                                                                        | 2.7 kB  00:00:00
(2/4): k6/x86_64/primary_db                                                                                                                                                                                                                                | 5.4 kB  00:00:00
(3/4): amzn2-core/2/x86_64/updateinfo                                                                                                                                                                                                                      | 787 kB  00:00:00
(4/4): amzn2-core/2/x86_64/primary_db                                                                                                                                                                                                                      |  70 MB  00:00:03
Resolving Dependencies
--> Running transaction check
---> Package k6.x86_64 0:0.49.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================================================================================
 Package                                                         Arch                                                                Version                                                                Repository                                                       Size
==================================================================================================================================================================================================================================================================================
Installing:
 k6                                                              x86_64                                                              0.49.0-1                                                               k6                                                               25 M

Transaction Summary
==================================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 25 M
Installed size: 53 M
Is this ok [y/d/N]: y
Downloading packages:
k6-v0.49.0-amd64.rpm                                                                                                                                                                                                                                       |  25 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Verifying  : k6-0.49.0-1.x86_64                                                                                                                                                                                                                                             1/1

Installed:
  k6.x86_64 0:0.49.0-1

Complete!
bash-4.2# k6 version
k6 v0.49.0 (commit/b5328aa782, go1.21.6, linux/amd64)

Could it be related to the machine specific? Is it a freshly started VM? Or maybe you could try to add k6's package repo again?

@olegbespalov olegbespalov added the awaiting user waiting for user to respond label Jan 30, 2024
@olegbespalov olegbespalov reopened this Jan 30, 2024
@olegbespalov
Copy link
Contributor

I'm closing the task; if new details appear, we could re-open it.

@olegbespalov olegbespalov removed triage awaiting user waiting for user to respond labels Feb 14, 2024
@olegbespalov olegbespalov removed their assignment Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation-needed A PR which will need a separate PR for documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants