Error: apt-key is deprecated

Good morning every one

I tried to install opennebula version 6.0 (on ubuntu 20.04 LTS) after going through the following steps:

apt update

apt-get -y install gnupg wget apt-transport-https

wget -q -O- | sudo apt-key add -

but it gives me this error:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

how can i solve? Thanks everyone for the help

Here is solution what i used in Opennebula Latest Version 6.6.0

Install Opennebula Repository

wget -q -O- | apt-key add -

apt-key export 906DC27C | sudo gpg --dearmour -o /usr/share/keyrings/opennebula.gpg

echo “deb [arch=amd64 signed-by=/usr/share/keyrings/opennebula.gpg] Index of /repo/6.6.0/Ubuntu/22.04 stable opennebula” > /etc/apt/sources.list.d/opennebula.list

sudo su -c “apt update”

Rest you know…