TL;DR
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
sudo apt update
sudo apt-get install unityhub
Issue
There is a bug in the "Install the Unity Hub on Linux" section of the Unity documentation.
For step 2 where we add the Unity repository to the Apt list, the documentation states the following command:
sudo sh -c 'echo "deb [signedby=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
However, when you go to update the list of sources using sudo apt update
you will get the following error:
Err:14 https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY BE3E6EA534E8243F
Solution
There is an error in the command. Step 2 should actually be the following: (signedby
should actually be signed-by
)
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
This will resolve the sudo apt update
command and allow installation of the Unity Hub.