1

I am trying to install MongoDb CLI (https://docs.mongodb.com/mongocli/master/install/). I begin by running wget --no-check-certificate -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - because a running wget -vO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - tells me I should use '--no-check-certificate'. I get an 'OK' response on the certificate after adding '--no-check-certificate' to the command.

After I run echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list I try running sudo apt-get update and receive

Ign:1 https://repo.mongodb.org/apt/ubuntu/dists focal/mongodb-org/5.0 InRelease
Err:2 https://repo.mongodb.org/apt/ubuntu/dists focal/mongodb-org/5.0 Release
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 99.84.102.50 443]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'https://repo.mongodb.org/apt/ubuntu/dists focal/mongodb-org/5.0 Release' does not have a Release file. 
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I then tried to another approach as mentioned on other answer boards - You can add [trusted=yes] in the sources.list So I run echo "deb [ trusted=yes ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list and then sudo apt-get update again. This time I see:

Ign:1 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:3 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Hit:6 http://archive.ubuntu.com/ubuntu focal InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Hit:9 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Hit:11 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all Packages
Err:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 Packages
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 99.84.102.2 443]
Ign:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse all c-n-f Metadata
Ign:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0/multiverse amd64 c-n-f Metadata
Reading package lists... Done
E: Failed to fetch https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/5.0/multiverse/binary-amd64/Packages  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 99.84.102.2 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.

It looks impressive with more output lines, but still the same problem. I looked into changing the keyring type to gpg (What commands (exactly) should replace the deprecated apt-key?) and using the [signed-by=/usr/local/share/keyrings/<your-keyfile-name>.gpg] trick, but that didn't not help. I don't feel this is a local certificate issue I am having. Any help would be appreciated.

0

0

Browse other questions tagged .