moby: apt repo for Xenial says the package cannot be authenticated
I have 4 brand new, out of the box pieces of hardware, I’ve installed Xenial 16.04 on them and updated all packages.
Having added the key for docker and the xenial package repository and attempted to install docker-engine on each of the four machines, I get the following error;
user@Machine:~$ sudo apt-get install -y docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount libltdl7
Suggested packages:
mountall
The following NEW packages will be installed
aufs-tools cgroupfs-mount docker-engine libltdl7
0 to upgrade, 4 to newly install, 0 to remove and 0 not to upgrade.
Need to get 14.6 MB of archives.
After this operation, 73.8 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
docker-engine
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
user@Machine:~$
Is the package in the Xenial repository not signed?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 54 (24 by maintainers)
Commits related to this issue
- Work around docker/docker#22599 — committed to kubernetes-retired/kubernetes-anywhere by errordeveloper 8 years ago
I am using this:
It worked.
I just encountered the very same problem. I managed to reproduce it under 16.04 VM.
If I do the following, the problem doesn’t appear:
However, I can reproduce this problem in a fresh VM if I add the repo first, and only add the key after
apt-get update
. Rerunningapt-get update
doesn’t solve the problem:Once it gets into this state, the only way to recover seems to be manually removing apt cache files:
It appears to me to be some
apt-get
quirk - adding a key after retrieving the repo list should be perfectly fine, AFAIK. Hope that helps.Website instructions are wrong, here is what works in 16.04:
I don’t have a physical box to test on, but I just created a fresh Ubuntu Xenial droplet on DigitalOcean, but I’m not able to reproduce, using these steps;
For Linux Mint 18 this fixed it for me: Menu -> Administration -> Software Sources -> Additional Repositories -> Edit the URL of the docker entry -> Replace
sarah
withxenial
@hamid-elaosta which region did you run on on DigitalOcean?
Here’s what I did;
Ubuntu 16.04 x64
,AMS3
region, 2GB memory)After that, running
docker version
Getting same issue
not getting pubkey for ubuntu 16.04 LTS
So this is the key in question;
If you install it using the fingerprint as documented here “Update your apt sources”, section 4; https://docs.docker.com/engine/installation/linux/ubuntulinux/
The
apt update
will succeed but theapt install docker-engine
will fail.If you then remove the key and install it again using;
Importantly, using the
F7622157
and NOT the fingerprint, followed by andapt update
and theapt install docker-engine
succeeds.Hopefully this can point us at the cause.
Here was the solution for me, similar to iEmiya:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
I Have also been seeing this issue for the last couple of days.I am using Vagrant shell provisioning to run
Up unit 5/6/16, I was able to provision my Ubuntu Trusty VM (Virtual Box) using this script. As of 5/6/16, I started getting:
I am operating behind a firewall and proxy. Using my company’s proxy credentials I have been able to set up docker this way for the past few months without issue.