|
| 1 | +.. _c2c-verify-signatures-gpg: |
| 2 | + |
| 3 | +================================ |
| 4 | +Verify Packages with GPG (Linux) |
| 5 | +================================ |
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 1 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +.. facet:: |
| 14 | + :name: genre |
| 15 | + :values: tutorial |
| 16 | + |
| 17 | +.. include:: /includes/verify-signatures-intro.rst |
| 18 | + |
| 19 | +This page describes how to use GPG to verify Linux packages. |
| 20 | + |
| 21 | +Before you Begin |
| 22 | +---------------- |
| 23 | + |
| 24 | +.. include:: /includes/verify-signatures-before-you-begin.rst |
| 25 | + |
| 26 | +Steps |
| 27 | +----- |
| 28 | + |
| 29 | +.. procedure:: |
| 30 | + :style: normal |
| 31 | + |
| 32 | + .. step:: Import the MongoDB Server Tools public key |
| 33 | + |
| 34 | + .. code-block:: sh |
| 35 | + |
| 36 | + curl https://pgp.mongodb.com/server-Tools.asc | gpg --import |
| 37 | + |
| 38 | + .. include:: /includes/verification-gpg-results.rst |
| 39 | + |
| 40 | + .. step:: Download the mongosync public signature |
| 41 | + |
| 42 | + To download the ``mongosync`` public signature, run the following |
| 43 | + command, replacing the placeholder values with your platform, |
| 44 | + architecture, and ``mongosync`` version: |
| 45 | + |
| 46 | + .. code-block:: sh |
| 47 | + |
| 48 | + curl -LO https://s3.amazonaws.com/downloads.mongodb.org/tools/mongosync/mongosync-<platform>-<architecture>-<version>.tgz.sig |
| 49 | + |
| 50 | + .. example:: |
| 51 | + |
| 52 | + The following URL contains the signature file for ``mongosync`` |
| 53 | + on Amazon Linux 2, version {+latest-version+}: |
| 54 | + |
| 55 | + ``https://s3.amazonaws.com/downloads.mongodb.org/tools/mongosync/mongosync-amazon2-x86_64-{+latest-version+}.tgz.sig`` |
| 56 | + |
| 57 | + .. step:: Verify the package |
| 58 | + |
| 59 | + .. code-block:: sh |
| 60 | + |
| 61 | + gpg --verify <path_to_signature_file> <path_to_mongosync_package> |
| 62 | + |
| 63 | + If the package is signed by MongoDB, the command returns: |
| 64 | + |
| 65 | + .. code-block:: sh |
| 66 | + :copyable: false |
| 67 | + |
| 68 | + gpg: Signature made Wed 19 Feb 2025 02:19:15 PM EST |
| 69 | + gpg: using RSA key D4E45C292A5C94962F0D10E13132835C1D925D5B |
| 70 | + gpg: Good signature from "MongoDB CLI Tools Release Signing Key < [email protected]>" [unknown] |
| 71 | + |
| 72 | + If the package is signed but the signing key is not added to your |
| 73 | + local ``trustdb``, the command returns: |
| 74 | + |
| 75 | + .. code-block:: sh |
| 76 | + :copyable: false |
| 77 | + |
| 78 | + gpg: WARNING: This key is not certified with a trusted signature! |
| 79 | + gpg: There is no indication that the signature belongs to the owner. |
| 80 | + |
| 81 | + If the package is not properly signed, the command returns an |
| 82 | + error message: |
| 83 | + |
| 84 | + .. code-block:: sh |
| 85 | + :copyable: false |
| 86 | + |
| 87 | + gpg: Signature made Wed 19 Feb 2025 02:19:15 PM EST |
| 88 | + gpg: using RSA key D4E45C292A5C94962F0D10E13132835C1D925D5B |
| 89 | + gpg: BAD signature from "MongoDB CLI Tools Release Signing Key < [email protected]>" [unknown] |
0 commit comments