6

I have tried installing Unity2d/3d via the terminal in a way to become more comfortable around the usage of the terminal and have across an issue where when I try and update via the terminal it brings up and error for unity2d/3d. I have copied on what is output once I have used sudo apt update:

Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease              
Hit:3 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease             
Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease            
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease               
Get:5 https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local stable InRelease [2,739 B]
Err:5 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
Reading package lists... Done
W: GPG error: 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
E: The repository 'https://hub.unity3d.com/linux/repos/deb stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I was using seeing the history on my terminal in the hope that I can see if I have inputted an incorrect command, although i do not see anything wrong I have noticed that I did use the same command twice, would this be reason on why I am getting the above error code?

I am using Ubuntu 20.04.4 LTS 64-bit 3.36.8

2
  • 1
    Does this answer your question? How do I fix the GPG error "NO_PUBKEY"? . Run sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE3E6EA534E8243F .
    – N0rbert
    Commented Mar 3, 2022 at 6:35
  • thank you for replying to me, I have read this followed the steps but this has not proven hepful, even going as far as liveconfig, I have followed the steps and my system itself is fully update but this issue seems to be with a repository that I have added for unity3d, for some reason it wont let me add new keys to it, for it too update.
    – technonoob
    Commented Mar 9, 2022 at 14:24

3 Answers 3

12

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.

2

The important bit from the Unity forums link above: https://forum.unity.com/threads/keyring-error.1290203/

wget -o- https://hub.unity3d.com/linux/keys/public
 
file public
 
gpg --no-default-keyring --keyring ./unity_keyring.gpg --import public
 
gpg --no-default-keyring --keyring ./unity_keyring.gpg --export > ./unity-archive-keyring.gpg
 
sudo mv ./unity-archive-keyring.gpg /etc/apt/trusted.gpg.d/
 
sudo apt update
 
sudo apt-get install unityhub
0

Different from @gencoreoperative that change signedby to signed-by that solved this issue.

My case is inverse: using signedby instead of signed-by.

My system:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .