Lxc-create ERROR: Unable to fetch GPG key from keyserver

Mohl by mi někdo nasměrovat, odpověď nenacházím ?

root@turris:~# lxc-create -t download -n Pihole
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: Pihole: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: Pihole: tools/lxc_create.c: main: 327 Failed to create container Pihole

root@turris:/tmp/log# cat  /etc/config/lxc

config lxc 'lxc'
	option url 'repo.turris.cz/lxc'

sks keyservers are dead. recent commits to lxc tools change keyserver, but this has not made it into turris package repos.

Mohu potvrdit, že to souvisí s tím, co napsal v komentáři uživatel @ackstorm23. Pro více informací je možné si přečíst krátkou zprávičku na Root.cz:

Než se oprava dostane do jednotlivých vydání, tak je možné upravit soubor /usr/share/lxc/templates/lxc-download podle změn z commitu na GitHubu.

English part:

Many packages come from OpenWrt feeds as it is, but in this case, for LXC we have patch in turris/build repository as we provide a newer version than it is in OpenWrt 19.07.

Here goes my Saturday changes:

Turris OS 3.x:

I suggest you use opt-in migration or reflash by using rescue modes as described in our documentation to use a newer version of Turris OS.

Turris OS 5.x (will be part of upcoming Turris OS 5.2.4 release):

Ok, that’s Turris OS part, but here is also pull requests to OpenWrt.

18.06 (EoL already!):




So, any pull requests are welcome to upstream and downstream distributions.

1 Like

ok, thanks to all, I got it working

For those that don’t have 5.2.4 on their hardware yet. There is a quick workaround fix I made as I figured out the same that there is problem with SKS keyserver.
I’ve added:

#Fix lxc container download
export DOWNLOAD_KEYSERVER=“hkp://keyserver.ubuntu.com”

to the end of /etc/profile and reboot. No problems with GPG keyring anymore.
Needed only in TOS <5.2.4

Would you mind not coming with the workaround, which seems to be an ugly hack? :frowning: I provided you 5 commits and a workaround which became a solution written in Czech, but only what you care is about the content, I mean the file, which is there.

Only what you need is to modify the file /usr/share/lxc/templates/lxc-download which is provided by package lxc-templates, and that’s the same as in the merged commits.

Sorry for the follow-up but its the solution I was using until now I read this topic and upgraded to 5.2.4. So its not needed anymore. Whatver that works:-)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.