auth
Manage authentication to the Ocuroot server
auth
The auth
command group provides commands for managing authentication with the Ocuroot server.
Authentication tokens can be stored either globally or locally within a source repository.
The OCUROOT_API_KEY
environment may also be used for authentication within a third-party CI platform.
Order of precedence for authentication:
OCUROOT_API_KEY
environment variable- Local repository auth file (
~/.ocuroot/auth
) - Global auth file (
~/.ocuroot/auth
)
Commands
login
Login to Ocuroot using your browser. This will open your default browser to complete the authentication process. After successful authentication, the server will redirect to a local endpoint to save your credentials.
Options:
--local
: Store credentials in the local repository’s.ocuroot/auth
file instead of globally in~/.ocuroot/auth
logout
Remove stored authentication credentials. If using the OCUROOT_API_KEY
environment variable, you will be warned that it will still be used for authentication.
Options:
--local
: Remove credentials from the local repository’s.ocuroot/auth
file instead of globally from~/.ocuroot/auth
view
View current authentication status and token source. This will show:
- Whether you’re using an environment variable token or a stored token file
- The location of the token
- The organization associated with the token
- The identity (user or service account) associated with the token
Options:
--local
: Check for credentials in the local repository’s.ocuroot/auth
file instead of globally in~/.ocuroot/auth
Examples
Login and store credentials globally:
Login and store credentials in the current repository:
View current authentication status:
Remove stored credentials: