0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

apt update に失敗した

Last updated at Posted at 2020-09-11

apt update でエラーを吐いた


$ sudo apt update
Hit:1 https://deb.debian.org/debian buster InRelease
Hit:2 https://deb.debian.org/debian-security buster/updates InRelease                        
Hit:3 https://packages.cloud.google.com/apt cloud-sdk InRelease                              
Ign:4 https://storage.googleapis.com/cros-packages/84 buster InRelease                       
Hit:6 https://storage.googleapis.com/cros-packages/84 buster Release   
Get:5 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease [23.4 kB]
Err:5 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
Reading package lists... Done
W: GPG error: https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
E: The repository 'https://packagecloud.io/headmelted/codebuilds/debian stretch 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.

エラーを見た感じ、証明書の検証が原因のよう

だから、以下のように証明書を追加する


$ sudo apt-get -qO - https://packagecloud.io/headmelted/codebuilds/gpgkey | sudo apt-key add -
OK

証明書管理は、apt-key コマンドで行う


$ apt-key help
Usage: apt-key [--keyring file] [command] [arguments]

Manage apt's list of trusted keys

  apt-key add <file>          - add the key contained in <file> ('-' for stdin)
  apt-key del <keyid>         - remove the key <keyid>
  apt-key export <keyid>      - output the key <keyid>
  apt-key exportall           - output all trusted keys
  apt-key update              - update keys using the keyring package
  apt-key net-update          - update keys using the network
  apt-key list                - list keys
  apt-key finger              - list fingerprints
  apt-key adv                 - pass advanced options to gpg (download key)

If no specific keyring file is given the command applies to all keyring files.

参考

Ubuntu Manpage: apt-key - APT キー管理ユーティリティ

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?