2023-06-05
Re-enabling grafana deb updates
I noticed grafana hadn't updated in a while. Normally cron-apt does the prefetching of updates and notifies me when new updates are available, so I can make sure updating doesn't break running stuff or I can resolve it quick. But cron-apt held an error message from apt update away from me which I saw by hand:root@gosper:~# apt update Get:1 https://packages.grafana.com/oss/deb stable InRelease [5,983 B] Err:1 https://packages.grafana.com/oss/deb stable InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9E439B102CF3C0C6 Get:2 http://deb.devuan.org/merged beowulf InRelease [33.5 kB] Get:3 http://deb.devuan.org/merged beowulf-security InRelease [26.1 kB] Get:4 http://deb.devuan.org/merged beowulf-updates InRelease [26.1 kB] Fetched 85.7 kB in 3s (28.4 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9E439B102CF3C0C6 W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9E439B102CF3C0C6 W: Some index files failed to download. They have been ignored, or old ones used instead.I partly followed the instructions in Problem with debian repository key - Grafana / Installation - Grafana Labs Community Forums to get things going again. I used /etc/apt/trusted.gpg.d because this is the standard directory, is already available and the remark about ubuntu means this is the only supported directory for gpg keys.root@gosper:~# cd /etc/apt/trusted.gpg.d/ root@gosper:/etc/apt/trusted.gpg.d# wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor > grafana.gpgBy putting the grafana.gpg in this directory it gets detected and used automatically. No need for a pointer in /etc/apt/sources.list.d/grafana.list. Now apt update doesn't complain, so I will be notified of new grafana versions available.