Skip to content

mongoshield login

Sign in to Google Drive or Dropbox and get the token for backups.

Terminal window
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.

ArgumentDescription
<provider>requiredgdrive or dropbox
OptionDescription
--ghStore 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.

Sign in to Google Drive:

Terminal window
mongoshield login gdrive

Sign in and save the token as a GitHub Actions secret:

Terminal window
mongoshield login gdrive --gh

Machine-readable output:

Terminal window
mongoshield login dropbox --json