Failing to get Public Key (openHAB installation Linux Debian)

One of the following is going on:

  1. The signed-by part of the line didn’t work
  2. The openhab.gpg file didn’t get created or became corrupted or something like that. Make sure that there is a /usr/share/keyrings/openhab.gpg file.
  3. You’re running an older version of apt which doesn’t support using gpg keys like this. I don’t know when having separate keys for individual repos was added to apt. It’s only recently that it’s become the “best practice”.

same issue on my end on Ubuntu

Get:10 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease [12.8 kB]                                                    
Err:10 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease  
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 075721F6A224060A
Hit:11 https://download.sublimetext.com apt/stable/ InRelease
Reading package lists... Done                            
W: GPG error: https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 075721F6A224060A
E: The repository 'https://openhab.jfrog.io/artifactory/openhab-linuxpkg 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.
1 Like

I just saw a PR go past sometime yesterday. There was a typo in the instructions. The echo "deb... command is using the wrong extension for the key. It should be pgp, not gpg.

7 Likes

it works, thanks

1 Like

Thanks Rick

That change makes it work perfectly.

echo 'deb [signed-by=/usr/share/keyrings/openhab.pgp] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list

It works for me too. Thanks!

1 Like

Thanks for this! I am curious though should it be gpg or pgp? I notice all the other keys I have in that fold are *.gpg. Not that is will stop it from working either way. It just stands out to me.

The docs have been updated to use gpg.

Huh? Next documentation still mixes up both openHAB on Linux | openHAB

As we are on the release, it is not next documentation….

@hmerk same applies for release docs at openHAB on Linux | openHAB. Ctrl+F pgp and ctrl+F gpg

@rlkoshak @Confectrician Have the changes not been merged?

Someone else filed an PR for the docs and I filed PR for the main web site and both were merged. I didn’t double check the PR for the docs page. I can confirm that it’s right on the downloads page but yes, it does appear to still be wrong in the docs. I’m not sure what could have gone wrong though.

1 Like

Hi,

I have the same issue with 4.0.0.M2 instructions . I have no public key for openhab.
it says gpg on the web page, is this right or do I have to change it to pgp?

Thanks

File extension .gpg is correct.
But it doesn’t matter if you would use the file extension .pgp and refer to the same file from within the signed-by section in file located in /etc/apt/sources.list.d/ it also would work

Did you follow the instruction on the download page to “create” the gpg public key ?

I think so.
I started with

  1. Install a recent Java 17 platform
  2. Add the repository key
    and so on…
    What do you mean with “create”?

there is one difference betrween stable and testing:
stable:

echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list

testing:

echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg testing main' | sudo tee /etc/apt/sources.list.d/openhab.list

do I need this “[signed-by=…” as well?

ok that was the reason… now it works…

Hi Rich,
Thank you very much. That saved my date and my believe in openHAB.
It would be very useful if this information would be mentioned in the official documentation. I couldn’t find it.
All other “apt …” commands went well.

I’m not sure where else that would go in the docs and it’s standard for apt repos and nothing specirfic to openHAB.

The instructions for apt on Download openHAB | openHAB discuss this file and what goes there. The [Linux installation instructions in the docs]( openHAB on Linux | openHAB) also discusses this file and what goes there.