Gitlab Upgrade An error occurred during the signature verification

hi guys,

I am using gitlab 14.8.2 and want to upgrade to latest version
my OS is using ubuntu 20.04

during upgrade hit error
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) packages@gitlab.com
W: Failed to fetch https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/dists/focal/InRelease The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) packages@gitlab.com
W: Some index files failed to download. They have been ignored, or old ones used instead.

how I can solve this issue?

thanks.

and this post for exact steps:

hint: search the forums first before posting, chances are your question has already been solved, as in this case!

2 Likes

I run below command as u provide
curl -s https://packages.gitlab.com/gpg.key | apt-key add - apt-get update

and hit error as below , how I can solve?
gpg: can’t open ‘apt-get’: No such file or directory
gpg: can’t open ‘update’: No such file or directory

thanks a lot

curl -s https://packages.gitlab.com/gpg.key | apt-key add -
and
apt-get update
are separate commands.

Either separate them with a new line or run this instead

curl -s https://packages.gitlab.com/gpg.key | apt-key add - ; apt-get update
2 Likes

thanks for help. now is working

1 Like