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

Options

string
Auth reference name. If omitted, you’re prompted for it; in a non-interactive shell the command fails with -name is required. Unlike auth login and auth show, this command does not accept the name as a positional argument.
string
Cloud provider: google or onedrive. If omitted, you’re prompted to pick one; in a non-interactive shell the command fails with -provider must be 'google' or 'onedrive'.

Google Options

string
Path to Google service account credentials JSON file. Optional. If not provided, Cloudstic uses the built-in OAuth flow.
string
Path to Google OAuth token file. If no token storage is given, the entry defaults to the secret reference config-token://google/<name> rather than a file. In interactive mode you’re prompted for the token storage and can enter either a path or a reference.

OneDrive Options

string
OneDrive OAuth client ID. Optional. If not provided, Cloudstic uses built-in credentials.
string
Path to OneDrive OAuth token file. If no token storage is given, the entry defaults to the secret reference config-token://onedrive/<name> rather than a file. In interactive mode you’re prompted for the token storage and can enter either a path or a reference.

General Options

string
Path to the profiles YAML file.

Examples

Output

On success, the command reports the entry it wrote and the file it wrote it to:

After Creating an Auth Entry

Run the OAuth login flow to obtain a token:
This opens your browser for authorization and saves the token to the configured file.

See Also