gitlabfedorarpmgnupgdnf

gitlab-ee-16.0.1-ee.0.el8 failed to update due to GPG check failed


I'm trying to update gitlab-ee from 15.11.2 to 16.0.1 under fedora 38 through dnf The update was failed due to the following error.

I had tried many ways to solve this issue but failed. Can any one help me get out of this mire?

error: Verifying a signature using certificate DBEF89774DDB9EB37D9FC3A03CFCF9BAF27EAB47 (GitLab, Inc. <support@gitlab.com>):                                
  1. Certificiate 3CFCF9BAF27EAB47 invalid: certificate is not alive                                                                                        
      because: The primary key is not live                                                                                                                  
      because: Expired on 2021-07-01T19:59:40Z                                                                                                              
  2. Key 3CFCF9BAF27EAB47 invalid: key is not alive                                                                                                         
      because: The primary key is not live                                                                                                                  
      because: Expired on 2021-07-01T19:59:40Z                                                                                                              
error: Verifying a signature using certificate DBEF89774DDB9EB37D9FC3A03CFCF9BAF27EAB47 (GitLab, Inc. <support@gitlab.com>):                                
  1. Certificiate 3CFCF9BAF27EAB47 invalid: certificate is not alive                                                                                        
      because: The primary key is not live                                                                                                                  
      because: Expired on 2021-07-01T19:59:40Z                                                                                                              
  2. Key 3CFCF9BAF27EAB47 invalid: key is not alive                                                                                                         
      because: The primary key is not live                                                                                                                  
      because: Expired on 2021-07-01T19:59:40Z                                                                                                              
gitlab_gitlab-ee                                                                                                            1.9 kB/s | 3.1 kB     00:01     
GPG key at https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey (0x51312F3F) is already installed                                                            
gitlab_gitlab-ee                                                                                                            3.9 kB/s | 3.8 kB     00:00     
GPG key at https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg (0xF27EAB47) is already installed                  
The GPG keys listed for the "gitlab_gitlab-ee" 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: gitlab-ee-16.0.1-ee.0.el8.x86_64                                   
 GPG Keys are configured as: https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey, https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645
A26AB9FBD22.pub.gpg                                                                                                                                         
The downloaded packages were saved in cache until the next successful transaction.                                                                          
You can remove cached packages by executing 'dnf clean packages'.                                                                                           
Error: GPG check FAILED                                                                                                                                     

Solution

  • Finally, I managed to resolve this issue by the following steps.

    Find out all gpg-pubkey installed on the local machine

    sudo rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n' | grep gitlab
    

    Remove all gpg-pubkey which related to gitlab

    sudo rpm -e gpg-pubkey-[keyId]