I’m having an issue with the signing keys for Mongo 4.2 on Debian.9 stretch, as documented here: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/
A minimal Dockerfile using the commands from that doc:
FROM debian:stretch RUN apt-get update RUN apt-get install -y wget gnupg RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - RUN echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list RUN apt-key list RUN apt-get update RUN apt-get install -y mongodb-org
This errors with:
WARNING: The following packages cannot be authenticated! mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools mongodb-org E: There were unauthenticated packages and -y was used without --allow-unauthenticated
This has just started failing yesterday on one of our builds, was previously working OK.
I’ve followed the troubleshooting instructions here: https://docs.mongodb.com/manual/reference/installation-ubuntu-community-troubleshooting/
And the key has been added as expected:
Step 6/8 : RUN apt-key list ---> Running in 1edf49f36623 Warning: apt-key output should not be parsed (stdout is not a terminal) /etc/apt/trusted.gpg -------------------- pub rsa4096 2018-04-18 [SC] [expires: 2023-04-17] E162 F504 A20C DF15 827F 718D 4B7C 549A 058F 8B6B uid [ unknown] MongoDB 4.2 Release Signing Key <[email@example.com](mailto:firstname.lastname@example.org)>
Has anyone else seen this issue? I’m very concerned that packages in the official repo.mongodb.org appear to no longer be signed by the officially documented public key, given that they previously were. Using debian:buster instead works fine, so I don’t think it’s an issue with the key that is documented (which is the same for both Stretch and Buster).