首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gitlab Debian存储库公钥不可用

Gitlab Debian存储库公钥不可用
EN

Server Fault用户
提问于 2020-05-02 10:58:25
回答 1查看 1.9K关注 0票数 4

当运行“sudo apt update”时,我得到以下错误:

代码语言:javascript
复制
user@gitlab:~$ sudo apt update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://ftp.fi.debian.org/debian stretch InRelease
Hit:3 http://ftp.fi.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.fi.debian.org/debian stretch Release
Get:6 https://packages.gitlab.com/gitlab/gitlab-ee/debian stretch InRelease [23.3 kB]
Err:6 https://packages.gitlab.com/gitlab/gitlab-ee/debian stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
Fetched 23.3 kB in 2s (11.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
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-ee/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
W: Failed to fetch https://packages.gitlab.com/gitlab/gitlab-ee/debian/dists/stretch/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
W: Some index files failed to download. They have been ignored, or old ones used instead.
EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-05-02 10:58:25

问题是Gitlab安装脚本安装的密钥已过期。这可以通过运行sudo apt-key list来验证。

代码语言:javascript
复制
user@gitlab:~$ sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2015-04-17 [SC] [expired: 2020-04-15]
      1A4C 919D B987 D435 9396  38B9 1421 9A96 E15E 78F4
uid           [ expired] GitLab B.V. (package repository signing key) 
-------Output Snipped----------

通过运行与Gitlab安装脚本相同的命令可以很容易地修复这个问题,该命令将从Gitlab获取新密钥并将其安装在APT密钥环中。

代码语言:javascript
复制
curl -L "https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey" 2> /dev/null | sudo apt-key add - &>/dev/null

在此之后,可以重新运行apt-key list命令,以验证密钥是否已正确安装。

代码语言:javascript
复制
user@gitlab:~$ sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2015-04-17 [SC] [expired: 2020-04-15]
      1A4C 919D B987 D435 9396  38B9 1421 9A96 E15E 78F4
uid           [ expired] GitLab B.V. (package repository signing key) 

pub   rsa4096 2020-03-02 [SC] [expires: 2022-03-02]
      F640 3F65 44A3 8863 DAA0  B6E0 3F01 618A 5131 2F3F
uid           [ unknown] GitLab B.V. (package repository signing key) 
sub   rsa4096 2020-03-02 [E] [expires: 2022-03-02]
票数 5
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1015294

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档