Windows 10 Ubuntu Error: Couldn't add GPG key for Flair repository

I am following the instructions outlined on the Cern website for Windows 10 users and when I try to run command “sudo ./setup_wsl.sh” I receive the following error:

Adding Firefox repository
Adding Flair repository
[ERROR] Couldn’t add GPG key for Flair repository. Try again later

I’ve tried restarting my computer to see if it was a network issue and that did not work. I’ve also tried following the Flair by Cern article for download which goes over instructions of installing flair through the flair repository on Ubuntu systems. I’ve also tried following the Linux Uprising article “apt-key Is Deprecated. How To Add OpenPGP Repository Signing Keys Without It On Debian, Ubuntu, Linux Mint, Pop!_OS, Etc.” which I’ve seen listed on here as a source when there’s problems with the GPG key. None of these methods have worked and I’m desperate for help at this point.

Dear Abegale,

I wasn’t able to reproduce the problem during a fresh install of Ubuntu 22.04 in WSL.
The setup script creates a log in the setup_wsl.out file. Could you upload it to have a better understanding of what is happening?

Cheers,
David

I had the same problem yesterday on a fresh install.

I managed to solve it using the solution in this topic:

modifying the setup script and replacing:

wget -O /etc/apt/trusted.gpg.d/flair.asc https://cern.ch/flair/download/ubuntu/flair.gpg 2>> $logfile
with
wget -O /etc/apt/trusted.gpg.d/flair.asc http://cern.ch/flair/download/ubuntu/flair.gpg 2>> $logfile

without the s in http.

1 Like

Dear Emerson,

thank you for the probable solution.

Dear Abegale,

The updated installation script is available to download from the CERN website:

Please let us know if this solves your problem.

Cheers,
David