Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Signatures couldn't be verified because the public key is not available error while installing docker

Tags:

docker

Unable to install docker with:

sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

error log:

GPG error: https://get.docker.com docker Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8576A8BA88D21E9

like image 557
Rohan Nagalkar Avatar asked Sep 11 '15 18:09

Rohan Nagalkar


4 Answers

Seems like the getting started page has changed.

Aug 2017

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-using-the-repository

Aug 2019

The link to the installation page has changed again

https://docs.docker.com/install/linux/docker-ce/debian

like image 177
Peter Chaula Avatar answered Nov 17 '22 12:11

Peter Chaula


If don't want to use those commands from manual http://docs.docker.com/linux/step_one/:

$ sudo apt-get update
$ sudo apt-get install wget
$ wget -qO- https://get.docker.com/ | sh

there is what you need:

 $ wget -qO- https://get.docker.com/gpg | sudo apt-key add -

PS: https://docs.docker.com/installation/debian/

like image 20
Valeriy Solovyov Avatar answered Nov 17 '22 13:11

Valeriy Solovyov


Got the solution, I was trying to install docker 1.5 on a 32-bit Ubuntu, whereas the documentation says it needs 64 bit Ubuntu.

check here in Prerequisites section

like image 40
Rohan Nagalkar Avatar answered Nov 17 '22 12:11

Rohan Nagalkar


The apt has a set of trusted keys and sometimes we only need to add the one that is missing.

You could have added the key just by running the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D8576A8BA88D21E9

Greetings.

like image 3
Thiago G. Alves Avatar answered Nov 17 '22 13:11

Thiago G. Alves