mongoshield login
Sign in to Google Drive or Dropbox and get the token for backups.
mongoshield login <provider> [options]Runs the provider's sign-in and prints the refresh token once, with the name of the secret it belongs in (MONGOSHIELD_<PROVIDER>_TOKEN). Google Drive shows a code to approve on any device, which works over SSH too; Dropbox opens a sign-in link in a browser on this machine. MongoShield only gets access to its own folder (Google: only the files it created). With --gh the token is stored as a GitHub Actions secret with the gh CLI instead.
Arguments
Section titled “Arguments”| Argument | Description | |
|---|---|---|
<provider> | required | gdrive or dropbox |
Options
Section titled “Options”| Option | Description |
|---|---|
--gh | Store the token as a repository secret with gh secret set (not printed). |
--repo <owner/name> | With --gh: the repository (default: the one in the current directory). |
--port <port> | Browser sign-in (Dropbox): the local port to receive the answer on. |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”Sign in to Google Drive:
mongoshield login gdriveSign in and save the token as a GitHub Actions secret:
mongoshield login gdrive --ghMachine-readable output:
mongoshield login dropbox --jsonMongoShield is MIT licensed and is not affiliated with, endorsed by or sponsored by MongoDB, Inc. MongoDB is a trademark of MongoDB, Inc.Privacy policy