this page
https://www.sublimetext.com/docs/linux_repositories.html
says to install the gpg key with this
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
but that results in this error:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
I assume this is the correct command:
wget -O- https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimetext-archive-keyring.gpg
But that seems to write the keyring to STDOUT.
What is the current correct way to add the gpg key for linux ubuntu 21.04?