Score:2

The following signatures couldn't be verified because the public key is not available - multi try

cn flag

I have Ubuntu 20.04 on my WSL and I am facing no pub key error during sudo get-apt update. I went through many questions and everywhere are written almost the same answers like:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY>

or

wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_20.04/Release.key

... but nothing works for me.

Full error:

W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY <KEY>
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.

Does anyone have idea what can I do more?

Score:2
vn flag

It appears you may have tried to manually install Docker Engine on Ubuntu under WSL and missed a step. You have a few options:

  • First, the Docker and Microsoft recommended method for installing Docker in WSL is to use Docker Desktop for Windows. See here for the reasons why I agree with this.

    If you choose to go this route, remove the Docker repository from your sources to resolve the existing error. You should be able to do this by removing /etc/apt/sources.list.d/docker.list, assuming you were following the Docker docs. Otherwise, look in that directory as well as the file /etc/apt/sources.list for a reference to the Docker repository, and remove it.

    sudo apt update
    

    At which point it should be successful.

  • If you do want to proceed with the manual installation of Docker Engine, you should be able to resolve the error by completing Step 2 of the installation instructions:

    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    

    Again, that should resolve the sudo apt update issue.

horytnik avatar
cn flag
Thank you very much! Yes I was trying to install Docker but after a problems I stopped for now. Solution by removing the docker.list and docker.list.save solved the problem. The interesting thing is that second step didn't solve the issue and I remember that I was doing this during installation. Anyway thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.