WARNING: THIS IS OUTDATED INFORMATION - the snapshots are now hosted on Artifactory, see this post. Please DO NOT USE the URLs that point to Cloudbees anymore!
Everyone,
please take note, that @theo just improved the snapshot repository on CloudBee to serve signed packages. This is a step forward but actions are needed on your side!
Description
If you are working with an existing apt snapshot setup from before 2016-09-23, the following error will be presented when you try to apt-get update
:
W: GPG error: https://openhab.ci.cloudbees.com InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F834FE4EEAC1183A
W: GPG error: https://openhab.ci.cloudbees.com InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F834FE4EEAC1183A
You may also see:
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Packages Hash Sum mismatch
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/Packages Hash Sum mismatch
Or you could be stuck with an old build of openHAB 2 without apt-get suggesting an upgrade for more than one week. This is also the case if you still see the version “2.0.0~SNAPSHOT”.
Solve
Add the signing key to your apt keyring:
wget -qO - http://www.openhab.org/keys/public-key-snapshots.asc | sudo apt-key add -
Then clean the apt cache so the changes in the repository are accepted:
# Clean
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
# Fetch all the newest from the repository
sudo apt-get update
# Upgrade openHAB
sudo apt-get upgrade
At this point apt should suggest an openHAB 2 upgrade.
If it does not, reinstall openHAB 2. Do not worry, your configuration and userdata will not be deleted in the process:
sudo apt remove openhab2-offline
sudo apt install openhab2-offline
# you may need to replace "offline" by "online"
sudo systemctl enable openhab2.service
sudo systemctl start openhab2.service
Verify
Your system is up to date if the command
dpkg -s openhab2-offline | grep Version
# you may need to replace "offline" by "online"
returns “Version: 2.0.0~20160923010346” with the shown or a newer timestamp.