Updating APT-repository GPG-key
The Bitware apt repository key should be held in its own keyring, so that it is easy to remove and update. It is used to verify deb-packages in the Bitware repository.
To update old repository to new one:
sudo mkdir -p /etc/apt/keyrings
wget -O - http://deb.bithouse.fi/repo/KEY.gpg | sudo apt-keygpg --keyringdearmor | sudo tee /etc/apt/keyrings/bitware.bithouse-archive-keyring.gpg add -
rm /etc/apt/sources.list.d/bitware.list --force
echo "deb [signed-by=/etc/apt/keyrings/bitware.bithouse-archive-keyring.gpg] http://deb.bithouse.fi/repo/ /" | sudo tee /etc/apt/sources.list.d/bitware.list
Additionally the GPG-key might change. If this has happened, the old key must be removed and a new key fetched from the repository.
To update a changed GPG-key for signature verification run the commands below as root:
rm /etc/apt/keyrings/bitware.gpg --force
rm /etc/apt/keyrings/bithouse-archive-keyring.gpg --force
wget -O - http://deb.bithouse.fi/repo/KEY.gpg | sudo apt-keygpg --keyringdearmor | sudo tee /etc/apt/keyrings/bitware.bithouse-archive-keyring.gpg add -
Edits 2024-10-11: Modified wget piping not to use apt-key (which is deprecated) and changed keyfile names to match Debian documentation. Also added --force flags to rm commands to suppress potential file does not exists error.