Fresh installation of version 13.12.0 is failing from RPM repository due to an GPG error
Pleasse check https://about.gitlab.com/blog/2021/06/16/gpg-key-used-to-sign-gitlab-runner-packages-rotated/ to more information.
Summary
When trying to install the GitLab runner in the version 13.12.0 from the RPM repository on an Amazon Linux 2 instance it fails.
Steps to reproduce
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
sudo -E yum install gitlab-runner
Actual behavior
Isn't installing the GitLab runner in version 13.12.0.
Expected behavior
Installs the GitLab runner in version 13.12.0
Relevant logs and/or screenshots
[root@ip-10-137-101-53 ~]# curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6904 100 6904 0 0 10460 0 --:--:-- --:--:-- --:--:-- 10444
Detected operating system as amzn/2.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/runner/gitlab-runner/config_file.repo?os=amzn&dist=2&source=script
done.
Installing pygpgme to verify GPG signatures...
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
runner_gitlab-runner-source/signature | 862 B 00:00:00
Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey
Importing GPG key 0x51312F3F:
Userid : "GitLab B.V. (package repository signing key) <packages@gitlab.com>"
Fingerprint: f640 3f65 44a3 8863 daa0 b6e0 3f01 618a 5131 2f3f
From : https://packages.gitlab.com/runner/gitlab-runner/gpgkey
Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg
runner_gitlab-runner-source/signature | 951 B 00:00:00 !!!
runner_gitlab-runner-source/primary | 175 B 00:00:01
Package pygpgme-0.3-9.amzn2.0.3.x86_64 already installed and latest version
Nothing to do
Installing yum-utils...
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package yum-utils-1.1.31-46.amzn2.0.1.noarch already installed and latest version
Nothing to do
Generating yum cache for runner_gitlab-runner...
Importing GPG key 0x51312F3F:
Userid : "GitLab B.V. (package repository signing key) <packages@gitlab.com>"
Fingerprint: f640 3f65 44a3 8863 daa0 b6e0 3f01 618a 5131 2f3f
From : https://packages.gitlab.com/runner/gitlab-runner/gpgkey
Generating yum cache for runner_gitlab-runner-source...
The repository is setup! You can now install packages.
[root@ip-10-137-101-53 ~]# sudo -E yum install gitlab-runner
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package gitlab-runner.x86_64 0:13.12.0-1 will be installed
--> Processing Dependency: git for package: gitlab-runner-13.12.0-1.x86_64
--> Running transaction check
---> Package git.x86_64 0:2.23.4-1.amzn2.0.1 will be installed
--> Processing Dependency: perl-Git = 2.23.4-1.amzn2.0.1 for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: git-core-doc = 2.23.4-1.amzn2.0.1 for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: git-core = 2.23.4-1.amzn2.0.1 for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: emacs-filesystem >= 25.3 for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: perl(Git::I18N) for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: perl(Git) for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Processing Dependency: libsecret-1.so.0()(64bit) for package: git-2.23.4-1.amzn2.0.1.x86_64
--> Running transaction check
---> Package emacs-filesystem.noarch 1:25.3-3.amzn2.0.2 will be installed
---> Package git-core.x86_64 0:2.23.4-1.amzn2.0.1 will be installed
---> Package git-core-doc.noarch 0:2.23.4-1.amzn2.0.1 will be installed
---> Package libsecret.x86_64 0:0.18.5-2.amzn2.0.2 will be installed
---> Package perl-Git.noarch 0:2.23.4-1.amzn2.0.1 will be installed
--> Processing Dependency: perl(Error) for package: perl-Git-2.23.4-1.amzn2.0.1.noarch
---> Package perl-TermReadKey.x86_64 0:2.30-20.amzn2.0.2 will be installed
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-2.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================================================================
Installing:
gitlab-runner x86_64 13.12.0-1 runner_gitlab-runner 135 M
Installing for dependencies:
emacs-filesystem noarch 1:25.3-3.amzn2.0.2 amzn2-core 64 k
git x86_64 2.23.4-1.amzn2.0.1 amzn2-core 135 k
git-core x86_64 2.23.4-1.amzn2.0.1 amzn2-core 5.0 M
git-core-doc noarch 2.23.4-1.amzn2.0.1 amzn2-core 2.4 M
libsecret x86_64 0.18.5-2.amzn2.0.2 amzn2-core 153 k
perl-Error noarch 1:0.17020-2.amzn2 amzn2-core 32 k
perl-Git noarch 2.23.4-1.amzn2.0.1 amzn2-core 47 k
perl-TermReadKey x86_64 2.30-20.amzn2.0.2 amzn2-core 31 k
Transaction Summary
===========================================================================================================================================================================================================================================
Install 1 Package (+8 Dependent packages)
Total download size: 143 M
Installed size: 207 M
Is this ok [y/d/N]: y
Downloading packages:
(1/9): emacs-filesystem-25.3-3.amzn2.0.2.noarch.rpm | 64 kB 00:00:00
(2/9): git-2.23.4-1.amzn2.0.1.x86_64.rpm | 135 kB 00:00:00
(3/9): git-core-doc-2.23.4-1.amzn2.0.1.noarch.rpm | 2.4 MB 00:00:00
(4/9): libsecret-0.18.5-2.amzn2.0.2.x86_64.rpm | 153 kB 00:00:00
(5/9): git-core-2.23.4-1.amzn2.0.1.x86_64.rpm | 5.0 MB 00:00:00
(6/9): perl-Error-0.17020-2.amzn2.noarch.rpm | 32 kB 00:00:00
(7/9): perl-Git-2.23.4-1.amzn2.0.1.noarch.rpm | 47 kB 00:00:00
(8/9): perl-TermReadKey-2.30-20.amzn2.0.2.x86_64.rpm | 31 kB 00:00:00
warning: /var/cache/yum/x86_64/2/runner_gitlab-runner/packages/gitlab-runner-13.12.0-1.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 880721d4: NOKEY======== ] 64 MB/s | 82 MB 00:00:00 ETA
Public key for gitlab-runner-13.12.0-1.x86_64.rpm is not installed
(9/9): gitlab-runner-13.12.0-1.x86_64.rpm | 135 MB 00:00:01
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 92 MB/s | 143 MB 00:00:01
Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey
Importing GPG key 0x51312F3F:
Userid : "GitLab B.V. (package repository signing key) <packages@gitlab.com>"
Fingerprint: f640 3f65 44a3 8863 daa0 b6e0 3f01 618a 5131 2f3f
From : https://packages.gitlab.com/runner/gitlab-runner/gpgkey
Is this ok [y/N]: y
Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg
Importing GPG key 0x35DFA027:
Userid : "GitLab, Inc. <support@gitlab.com>"
Fingerprint: 09e5 7083 f34c ca94 d541 bc58 a674 bf81 35df a027
From : https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg
Is this ok [y/N]: y
Public key for gitlab-runner-13.12.0-1.x86_64.rpm is not installed
Failing package is: gitlab-runner-13.12.0-1.x86_64
GPG Keys are configured as: https://packages.gitlab.com/runner/gitlab-runner/gpgkey, https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg
Possible fixes
Not actually a fix, but disabling
repo_gpgcheck=1
gpgcheck=1
allows installing the package of course.
Edited by Steve Xuereb