webmin: GPG error: the public key is not available: NO_PUBKEY 2D223B918916F2A2
Upgraded to the lastest Webmin version, now getting the following error when doing a sudo apt update
W: GPG error: https://download.webmin.com/download/newkey/repository stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2D223B918916F2A2
E: The repository 'https://download.webmin.com/download/newkey/repository stable Release' 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.
Running on Ubuntu Linux 20.04.6
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 63
Try:
For those who are seeing this issue, try running :
cat /usr/share/webmin/webmin/developers-key.asc | gpg --dearmor >/usr/share/keyrings/debian-webmin-developers.gpgIf that fails, please post the output here…
Fixed it for me
Thanks a lot !
The right fix is generally the simplest thanks
The solution was in the error message:
In
etc/apt/sources.listI comment out the line which mentions webmin:And
/etc/apt/sources.list.d/webmin.listI left it and that solved my issue(s)!Check your
sources.listfor duplicate entriesAfter running:
It worked again …
@iliajie
Your commands was the fix for this problem. Thanks!
cd /usr/share/webmin/ ./setup-repos.sh -f
Same issue on an Ubuntu 22.04 64bit server
then ran the commands but needed to change permissions on the gpg file and then changed back to 0644 and while the file is now not 0kb it still gives the same gpg error.
Hello,
I ran
sudo cat /usr/share/webmin/webmin/developers-key.asc | gpg --dearmor >/usr/share/keyrings/debian-webmin-developers.gpgwhat gave me aPremission Denied.Running as root I got no
Permision Deniederror but runningsudo apt updatestill gives meAlso when doing an
apt updateno updates are found, but within Webmin updates are found.Odd that this failed when Webmin ran the same command. Unless perhaps you were out of disk space at the time?
Same problem here after clicking on the button in the webmin dashboard to switch to the new stable repository. My linux knowledge are limited, I tried to change the key with gpg but I am still searching the right command with the good fingerprint to solve the issue
See edited version above. On some servers, my installwebmin.sh bash script fixes any problems. On other servers it doesn’t.
#!/bin/bash apt update -y cd /tmp rm setup-repos.* #curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh wget https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh apt update -y apt install webmin --install-recommends -y /usr/share/webmin/changepass.pl /etc/webmin root ??? echo “Run:” echo “vim /etc/webmin/miniserv.conf” echo “Replace the line keyfile=/etc/webmin/miniserv.pem with:” echo “keyfile=/etc/certhelper/certs/???/privkey.pem” echo “certfile=/etc/certhelper/certs/???/fullchain.pem” echo “Then run systemctl restart webmin”
Please correct me if I’m wrong, so I can edit my first post with the proposed solutions.
I hate scrolling through forums and GitHub posts to find bits and pieces for a solution(s)
Solutions:
Solution 1:
cd /usr/share/webmin/run./setup-repos.sh -fAnd thereafter editing
/etc/apt/sources.listAdd a#before the Webmin lineIf you have the following:
/etc/apt/sources.list.d/webmin.listSolution 2:
Run the following as
cat /usr/share/webmin/webmin/developers-key.asc | gpg --dearmor >/usr/share/keyrings/debian-webmin-developers.gpgSolution 3
Any third solution?
So what solved it for me was: cd /usr/share/webmin/ ./setup-repos.sh -f
And thereafter editing /etc/apt/sources.list Add a # before the Webmin Line: # deb https://download.webmin.com/download/newkey/repository stable contrib
Thank you @iliajie and @SlowFox72 !!
No need for the cat commmand
These commands solved the Webmin’s Keys problem, thank you very much!
ATTENTION: The public key needs to be added with:
apt-key add /usr/share/webmin/webmin/developers-key.ascThen runcat /usr/share/webmin/webmin/developers-key.asc | gpg --dearmor >/usr/share/keyrings/debian-webmin-developers.gpgDo this as root.
It worked for me. It’s probably because some people (including me) used the old jcameron-key.asc key.
BEFORE W: GPG error: https://download.webmin.com/download/newkey/repository stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 2D223B918916F2A2 E: The repository ‘https://download.webmin.com/download/newkey/repository stable Release’ 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.
AFTER Ign:11 https://download.webmin.com/download/newkey/repository stable InRelease Get:12 https://download.webmin.com/download/newkey/repository stable Release [16.0 kB] Get:13 https://download.webmin.com/download/newkey/repository stable Release.gpg [819 B] Get:14 https://download.webmin.com/download/newkey/repository stable/contrib amd64 Packages [1442 B] Fetched 18.3 kB in 2s (8373 B/s)
Reading package lists… Done Building dependency tree… Done Reading state information… Done 3 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
I have the same issue as above mentioned: After the
/usr/share/webmin$ sudo ./setup-repos.sh -fYou missed
cat, the right command is:Just tried it again: Pressing the upgrade button creates an empty gpg file. Running the mentioned command fails as well:
All affected systems are running Debian 12. By the way I am observing strange file/directory copy problems on all systems that have been upgraded from Debian 11 to Debian 12 as well, maybe this is related.
Thanks a lot Problem fixed by your command👍👍
just happened on a second system too. Fixed with the above command.
Both of my systems have >500GB free space on the partitions where the /usr/share and /etc dirs reside.
Of note, there was an existing debian-webmin-developers.gpg file there BEFORE I ran the above command. And I had to run it as root, sudo didn’t seem to work for some reason
Same here. Upon clicking the upgrade button, an empty keyring was generated in /usr/share/keyrings/debian-webmin-developers.gpg causing all upcoming apt update checks on the new webmin repo to fail.
Same issue here as well. I regret clicking the prompt now.