Installation of openhab with APT fails

Dear experts,

I had to do a fresh install of Debian Bullseye on my RaspberryPi 3 mod B after I crashed the previous installation with a full-upgrade…
After I reinstalled the operating system and java 11 I tried to install openhab with option 2 from the download section of the openhab website. Unfortunately, the installation of the apt key fails permanently:

$ wget -qO - ‘https://openhab.jfrog.io/artifactory/api/gpg/key/public’ | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.

Can anyone tell me what’s wrong here? I already run into troubles updating with apt on the previous installation. Found 100s of threads in the forum on similar problems but unfortunately none with a solution…

System parameter:
Raspberry Pi 3 Model B Plus Rev 1.3
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
openjdk version “11.0.15” 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-post-Raspbian-1deb11u1)
OpenJDK Server VM (build 11.0.15+10-post-Raspbian-1deb11u1, mixed mode)

Thanks for any assistance,

Dominic

While using a Raspberry, why not using openHABian. Makes life lot easier…

Indeed openHABian should be easier.

When I run the wget I get nothing back (empty file) but when I visit that page using a browser it downloads the key as expected.

I found the following to work though:

wget -qO - https://openhab.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -

Notice there’s no quotes around the URL.

I’m not sure why that should matter but it seems to.

Since apt-key is deprecated anyway I’ll update the docs with the more up to date way to do it.

1 Like

I also get this notification when doing an apt update

Warning: https://openhab.jfrog.io/openhab/openhab-linuxpkg/dists/testing/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

So if the docs are updated, this problem will be fixed!

Proposal for doc change to „best practice, like used in openHABian can be found here

Hi Rich,

Thanks for the hint, but the proposed solution delivers the same error:
$ wget -qO - https://openhab.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.

I found that my web browser indeed is downloading some key file “artifactory.gpg.public”. Apparently gpg does not like it.

Regards, Dominic

It’s the same URL, the only difference is whether or not there are quotes.

The browser is showing that the file is there. I’ve verified several times over the past two days that the file is a proper public key. So for some reason the wget is returning an empty file. You can see what it’s getting by removing the | sudo apt-key add - from the command. That will show what’s being downloaded.

There is something off about your system if it repeatedly fails that I can’t solve here nor can we solve at jfrog.io. The file is there and at least as of an hour or so ago it works, if wget can successfully get it.

Uh oh. You are right (once again). After a deep dive I realized that I messed my dhcpcd.conf and none of my commands actually reached WAN (wonder how I nevertheless managed to install samba).
Sorry for the inconvenience, that’s what happens if gifted amateurs do programming :wink: