|
| 1 | +.. _compass-verify-signatures-gpg: |
| 2 | + |
| 3 | +======================== |
| 4 | +Verify Packages with GPG |
| 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 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 |compass| public key |
| 33 | + |
| 34 | + .. code-block:: sh |
| 35 | + |
| 36 | + curl https://pgp.mongodb.com/compass.asc | gpg --import |
| 37 | + |
| 38 | + .. include:: /includes/verification-gpg-results.rst |
| 39 | + |
| 40 | + .. step:: Download the |compass| public signature |
| 41 | + |
| 42 | + To download the |compass| public signature, go to the `Compass |
| 43 | + Releases <https://github.com/mongodb-js/compass/releases>`__ page |
| 44 | + on GitHub and download the corresponding ``.sig`` file for your |
| 45 | + version and variant. |
| 46 | + |
| 47 | + For example, if you downloaded the |
| 48 | + ``mongodb-compass-{+current-version+}-darwin-x64.zip`` archive, |
| 49 | + download the |
| 50 | + ``mongodb-compass-{+current-version+}-darwin-x64.zip.sig`` |
| 51 | + signature. |
| 52 | + |
| 53 | + .. note:: |
| 54 | + |
| 55 | + Make sure that you select the correct version in the GitHub |
| 56 | + releases page when you download the signature. |
| 57 | + |
| 58 | + .. step:: Verify the package |
| 59 | + |
| 60 | + .. code-block:: sh |
| 61 | + |
| 62 | + gpg --verify <path_to_signature_file> <path_to_compass_archive> |
| 63 | + |
| 64 | + If the package is signed by MongoDB, the command returns: |
| 65 | + |
| 66 | + .. code-block:: sh |
| 67 | + :copyable: false |
| 68 | + |
| 69 | + gpg: Signature made Mon Jan 22 10:22:53 2024 CET |
| 70 | + gpg: using RSA key AB1B92FFBE0D3740425DAD16A8130EC3F9F5F923 |
| 71 | + gpg: Good signature from "MongoDB Compass Signing Key < [email protected]>" [unknown] |
| 72 | + |
| 73 | + If the package is signed but the signing key is not added to your |
| 74 | + local ``trustdb``, the command returns: |
| 75 | + |
| 76 | + .. code-block:: sh |
| 77 | + :copyable: false |
| 78 | + |
| 79 | + gpg: WARNING: This key is not certified with a trusted signature! |
| 80 | + gpg: There is no indication that the signature belongs to the owner. |
| 81 | + |
| 82 | + If the package is not signed properly, the command returns an |
| 83 | + error message: |
| 84 | + |
| 85 | + .. code-block:: sh |
| 86 | + :copyable: false |
| 87 | + |
| 88 | + gpg: Signature made Mon Jan 22 10:22:53 2024 CET |
| 89 | + gpg: using RSA key AB1B92FFBE0D3740425DAD16A8130EC3F9F5F923 |
| 90 | + gpg: BAD signature from "MongoDB Compass Signing Key < [email protected]>" [unknown] |
0 commit comments