Repository navigation
Got "repomd.xml signature could not be verified for kubernetes" error when installing Kubernetes from yum repo on Amazon Linux 2 #60134
Copy link
Copy link
Closed
Labels
area/provider/awsIssues or PRs related to aws providerIssues or PRs related to aws providerkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.sig/releaseCategorizes an issue or PR as relevant to SIG Release.Categorizes an issue or PR as relevant to SIG Release.
Description
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
I'm trying to install Kubernetes on Amazon Linux 2 as described here, but I get error:
[user@example.com ~]$ sudo yum install -y kubelet kubeadm kubectl
Loaded plugins: langpacks, priorities, update-motd
kubernetes/signature | 454 B 00:00:00
Retrieving key from https://packages.cloud.google.com/yum/doc/yum-key.gpg
Importing GPG key 0xA7317B0F:
Userid : "Google Cloud Packages Automatic Signing Key <gc-team@google.com>"
Fingerprint: d0bc 747f d8ca f711 7500 d6fa 3746 c208 a731 7b0f
From : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Retrieving key from https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
kubernetes/signature | 1.4 kB 00:00:00 !!!
https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes
Trying other mirror.
One of the configured repositories failed (Kubernetes),
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=kubernetes ...
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 kubernetes
or
subscription-manager repos --disable=kubernetes
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=kubernetes.skip_if_unavailable=true
failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try.
https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes
What you expected to happen:
Successful installation kubelet kubeadm kubectl
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version): I guess should be1.9.3 - Cloud provider or hardware configuration: AWS
- OS (e.g. from /etc/os-release):
NAME="Amazon Linux"
VERSION="2 (2017.12)"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2 (2017.12) LTS Release Candidate"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
- Kernel (e.g.
uname -a):
Linux 4.9.76-38.79.amzn2.x86_64 #1 SMP Mon Jan 15 23:35:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- Install tools:
- Others:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/provider/awsIssues or PRs related to aws providerIssues or PRs related to aws providerkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.sig/releaseCategorizes an issue or PR as relevant to SIG Release.Categorizes an issue or PR as relevant to SIG Release.
Activity
AlexStasko commentedon Feb 22, 2018
/sig aws
AlexStasko commentedon Feb 26, 2018
Any thought?
3dbrows commentedon Mar 8, 2018
I'm seeing the same. You can get it to work by setting
repo_gpgcheck=0in/etc/yum.repos.d/kubernetes.repobut that is obviously not a real solution.DylanGraham commentedon May 2, 2018
You can re-import the keys:
rpm --import https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpgguilhemmarchand commentedon Jun 9, 2018
Hi,
Same problem here running, using
repo_gpgcheck=0fixes it but shouldn't that be fixed ?kiithwarrior commentedon Jun 13, 2018
repo_gpgcheck=0 worked for me as well, needs a better solution
bjethwan commentedon Jun 17, 2018
It's still failing while I was trying to install kubectl on ec2 with amazon linux
fejta-bot commentedon Sep 15, 2018
Issues go stale after 90d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with
/close.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
ab0ris commentedon Sep 26, 2018
just faced the same issue on AWS EC@ instance with Amazon Linux 2 installed
zr2d2 commentedon Sep 30, 2018
/remove-lifecycle stale
51 remaining items
mattsawyer77 commentedon Apr 1, 2021
It appears that this issue, or one very similar, has recurred in the last few days. We've found that we can't create new nodes currently, and we're getting essentially the same error as the OP.
luk4z7 commentedon Apr 1, 2021
@mattsawyer77 I had the same issue early in this morning, but in centos 7 and gnupg2 2.0.22
jValdron commentedon Apr 1, 2021
@mattsawyer77 / @luk4z7, see #97077 (comment)
Solved the issue for me.
EDIT: Nevermind, it did not :(
dkleissa commentedon Apr 1, 2021
I think I'm agreeing with @mattsawyer77.
While we're running a different setup (not on Amazon Linux 2), in CentOS7 installs have started to fail with the
https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kuberneteserror.I can reproduce the issue by starting a centos7 container and trying to install anything.
Interesting data points:
Current output when installing:
output when trying yum commands on older, previously functioning node:
To reproduce:
then:
Repeating this with
docker run -it centos:centos8 /bin/bashworks. Note in centos8gnupg2-2.2.20-2.el8is installed instead ofgnupg2-2.0.22-5.el7_5.BenTheElder commentedon Apr 2, 2021
current issue is tracked in kubernetes/release#1982 and is not the same as #60134 (comment)
instead of an issue with the image it's an issue with usage of an expired key
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
Disable repo_gpgcheck for kube repo in build image: This is a fix acc…
apmmahesh25 commentedon Nov 26, 2021
fix: disable gpg checks on yum repo due to "kubernetes/kubernetes#60134"
repomd.xml signature not verified. kubernetes/kubernetes#60134
rafishaik1 commentedon Jun 15, 2022
Try this way.It worked for me.
rpm --import https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
sudo yum install -y http://mirror.centos.org/centos/7/os/x86_64/Packages/gnupg2-2.0.22-5.el7_5.x86_64.rpm