Setiap server perlu dimaintenance salah satu maintenance pada server adalah melakukan update rutin pada server, dengan perintah :
yum update
Kenapa menggunakan yum update kebetulan kendala berikut terjadi pada server centos 7. Saat proses update server kebetulan server yang diupdate adalah server gitlab. Ketika proses update terjadi error GPG key retrieval failed: [Errno 14] HTTPS Error 404 – Not Found.
Download packages terjadi error:
Downloading packages: warning: /var/cache/yum/x86_64/7/runner_gitlab-runner/packages/gitlab-runner-14.0.1-1.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 35dfa027: NOKEY Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey 1 Retrieving key from https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-366915F31B487241.pub.gpg GPG key retrieval failed: [Errno 14] HTTPS Error 404 - Not Found
Solusinya bisa menggunakan 2 cara, jadi silahkan pilih satu perintah berikut :
Solusi Pertama :
Buka terminal dan jalankan perintah :
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
Kemudian coba kembali update server dengan menggunakan perintah :
yum update
Jika ada seperti seperti berikut ketika update ketik y aja untuk menyetujui perubahan
Transaction Summary ================================================================================================================================================================ Install 1 Package Upgrade 18 Packages Remove 1 Package Total size: 1.3 G Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/7/runner_gitlab-runner/packages/gitlab-runner-14.0.1-1.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 35dfa027: NOKEY Retrieving key 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 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
Jika sudah tampil seperti diatas berarti kita sudah sukses mengatasi GPG key retrieval failed: [Errno 14] HTTPS Error 404 – Not Found
Solusi Kedua :
Melakukan edit pada file gitlab_gitlab-ce.repo yang terletak di lokasi : /etc/yum.repos.d/gitlab_gitlab-ce.repo
Edit file tersebut dengan perintah :
vim /etc/yum.repos.d/gitlab_gitlab-ce.repo
jika perintah vim sudah di install langsung gunakan perintah di atas, jika belum silahkan install vim terlebih dahulu dengan perintah :
sudo yum install vim-enhanced -y
Jika sudah di buka silahkan ganti isi dari gitlab_gitlab-ce.repo dengan isian file pada url berikut :
yang berisikan :
[runner_gitlab-runner] name=runner_gitlab-runner baseurl=https://packages.gitlab.com/runner/gitlab-runner/el/7/$basearch repo_gpgcheck=1 gpgcheck=1 enabled=1 gpgkey=https://packages.gitlab.com/runner/gitlab-runner/gpgkey https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 [runner_gitlab-runner-source] name=runner_gitlab-runner-source baseurl=https://packages.gitlab.com/runner/gitlab-runner/el/7/SRPMS repo_gpgcheck=1 gpgcheck=1 enabled=1 gpgkey=https://packages.gitlab.com/runner/gitlab-runner/gpgkey https://packages.gitlab.com/runner/gitlab-runner/gpgkey/runner-gitlab-runner-4C80FB51394521E9.pub.gpg sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300
Jika sudah melakukan replace isian dari gitlab_gitlab-ce.repo silahkan save dengan perintah :
:wq!
Selanjutkan gunakan perintah update server kembali, dengan perintah :
yum update
Jika sudah tampil seperti diatas berarti kita sudah sukses mengatasi GPG key retrieval failed: [Errno 14] HTTPS Error 404 – Not Found
Catatan :
Jika ada kendala Berikut : Double check your curl installation and try again.
Detected operating system as centos/7. Checking for curl... Detected curl... Downloading repository file: hhttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=6&source=script curl: (6) Couldn't resolve host 'packages.gitlab.com' Unable to run: curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=6&source=script Double check your curl installation and try again.
Silahkan gunakan proxy dikarenakan server tidak terkoneksi internet
Berikut contoh perintah berikut export proxy di terminal
export https_proxy=username:password@proxy:port
Untuk username, password, proxy dan port disesuaikan dengan settingan proxynya.
Sekian tutorial kali ini, semoga bermanfaat 🙂
Referensi :
- https://forum.gitlab.com/t/unable-to-upgrade-from-13-12-2-to-14-0-4-centos-7-9-2009/55420
- https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3243
- https://docs.gitlab.com/omnibus/update/package_signatures#fetching-new-keys-after-2020-04-06
- https://docs.gitlab.com/runner/install/linux-repository.html
- https://packages.gitlab.com/runner/gitlab-runner/install
- https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4483
- https://packages.gitlab.com/install/repositories/runner/gitlab-runner/config_file.repo?os=centos&dist=7&source=script
- https://stackoverflow.com/questions/38050400/installing-gitlab-on-centos-6-5-curl-error