How to fix apt error: NO_PUBKEY 1F3045A5DF7587C3


When running apt update, you see the following error message:

Err:14 stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3


This error occurs due to the Skype repo using the outdated (as of April 2022) apt-key method of importing keys.

You can import the key using the following commands:

wget -qO- | gpg --dearmor | sudo tee /usr/share/keyrings/skype-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/skype-archive-keyring.gpg] stable main" > /etc/apt/sources.list.d/skype-stable.list

and then running

apt update