首页 新闻 会员 周边 捐助

安装 gitlab-runner 出现 "GPG error" 错误

0
悬赏园豆:30 [已解决问题] 解决于 2022-12-23 15:17

将系统从 ubuntu 20.04(focal) 升级至 ubuntu 22.04(jammy) 后,将 /etc/apt/sources.list.d/runner_gitlab-runner.list 中的 focal 改为 jammy

deb [signed-by=/usr/share/keyrings/runner_gitlab-runner-archive-keyring.gpg] https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ jammy main
deb-src [signed-by=/usr/share/keyrings/runner_gitlab-runner-archive-keyring.gpg] https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ jammy main

运行 apt update 时报错

Err:6 https://packages.gitlab.com/runner/gitlab-runner/ubuntu jammy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
Reading package lists... Done
W: GPG error: https://packages.gitlab.com/runner/gitlab-runner/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
E: The repository 'https://packages.gitlab.com/runner/gitlab-runner/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

通过下面的命令安装 key,问题依旧

curl -s https://packages.gitlab.com/gpg.key | apt-key add -
dudu的主页 dudu | 高人七级 | 园豆:30778
提问于:2022-12-23 13:53
< >
分享
最佳答案
0

通过下面的命令安装 gpg key 解决了

curl -fsSL https://packages.gitlab.com/runner/gitlab-runner/gpgkey \
  | gpg --dearmor > /usr/share/keyrings/runner_gitlab-runner-archive-keyring.gpg
dudu | 高人七级 |园豆:30778 | 2022-12-23 15:17
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册