Summary
apt update で public key is no available というエラーが発生。$ sudo apt update
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
apt-key を使って鍵を追加しようとする
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 467B942D3A79BD29
Executing: /tmp/apt-key-gpghome.XXXXXXXXXX/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 467B942D3A79BD29
gpg: keyserver receive failed: Server indicated a failure
keys.gnupg.net が obsolete になったため、keyserverが見つからないようだ。
keyserver を変更して鍵を追加
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
Executing: /tmp/apt-key-gpghome.aZcq2blOEC/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
gpg: key 467B942D3A79BD29: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
apt-key は廃止予定 (deprecated)
Debian 12 (Bookworm) で apt-key が削除される予定。gnupg で代替できるようだ。
Reference
GnuPG - Maniphest T5527 - keys.gnupg.net is obsoletehttps://dev.gnupg.org/T5527
gihyo.jp - Ubuntu Weelky Recipe - 2021-07-21 - 第675回 apt-keyはなぜ廃止予定となったのか
https://gihyo.jp/admin/serial/01/ubuntu-recipe/0675
znz blog - 2022-07-04 - apt-keyの代わりにsigned-byを使うときの鍵の置き場所
https://blog.n-z.jp/blog/2022-07-04-apt-key-signed-by.html
ククログ - 2021-05-05 - 非推奨となったapt-keyの代わりにsigned-byとgnupgを使う方法
https://www.clear-code.com/blog/2021/5/5.html