The following signatures couldn‘t be verified because the public key is not available: NO_PUBKEY

# sudo apt-get update

发生异常

Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease

Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease

Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease                             

Get:4 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic InRelease [23.5 kB]             

Err:4 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic 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 bionic 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 bionic 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

解决:

直接执行如下命令,比如我没有 3F01618A51312F3F,就需要执行

# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3F01618A51312F3F

Executing: /tmp/apt-key-gpghome.dOCPRYVKxF/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 3F01618A51312F3F
gpg: key 3F01618A51312F3F: public key "GitLab B.V. (package repository signing key) <packages@gitlab.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
 

# sudo apt-get update
Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease
Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease                         
Get:4 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic InRelease [23.5 kB]
Ign:5 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic/main amd64 Packages
Get:6 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic/main i386 Packages [17.4 kB]                                                                                     
Get:5 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic/main amd64 Packages [17.6 kB]                                                                                    
Fetched 58.4 kB in 8s (7,566 B/s)                                                                                                                                                     
Reading package lists... Done
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值