Skip to main content
Create or update a named auth entry for cloud source authentication (Google Drive or OneDrive). Auth entries store OAuth token file paths and optional credentials, and can be shared across multiple profiles.

Usage

cloudstic auth new [options]

Options

-name
string
required
Auth reference name.
-provider
string
required
Cloud provider: google or onedrive.

Google Options

-google-credentials
string
Path to Google service account credentials JSON file. Optional. If not provided, Cloudstic uses the built-in OAuth flow.
-google-token-file
string
Path to Google OAuth token file. If not provided, defaults to ~/.config/cloudstic/tokens/google-<name>_token.json.

OneDrive Options

-onedrive-client-id
string
OneDrive OAuth client ID. Optional. If not provided, Cloudstic uses built-in credentials.
-onedrive-token-file
string
Path to OneDrive OAuth token file. If not provided, defaults to ~/.config/cloudstic/tokens/onedrive-<name>_token.json.

General Options

-profiles-file
string
Path to the profiles YAML file.

Examples

cloudstic auth new \
  -name google-main \
  -provider google

After Creating an Auth Entry

Run the OAuth login flow to obtain a token:
cloudstic auth login -name google-main
This opens your browser for authorization and saves the token to the configured file.

See Also