MongoDB 4.2 packages on Debian Stretch cannot be authenticated

I’m having an issue with the signing keys for Mongo 4.2 on Debian.9 stretch, as documented here:

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 - | apt-key add -
RUN echo "deb 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
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:

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)
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 <[](>

Has anyone else seen this issue? I’m very concerned that packages in the official 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).

Trying to edit but it won’t let me (new users can only have 2 links apparently), so to update - this is now resolved. Unsure what fixed it, no changes our side, assume it was a MongoDB infrastructure issue.

Hi Chris,

Some of the latest 4.2 Debian/Ubuntu packages released were inadvertently signed with the 4.4 signing key:

Apologies for the inconvenience, this problem has been corrected.



This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.