Error
sudo apt update
...
Get:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease [81.6 kB]
Err:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
Reading package lists... Done
W: GPG error: http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
E: The repository 'http://apt.postgresql.org/pub/repos/apt stretch-pgdg 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.
解決方法
nakamasato@xxxx:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXX
Executing: /tmp/apt-key-gpghome.zfSr40cnbr/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXXXX
gpg: key XXXXXXXXXXXXXX: 6 signatures not checked due to missing keys
gpg: key XXXXXXXXXXXXXX: public key "PostgreSQL Debian Repository" imported
gpg: Total number processed: 1
gpg: imported: 1