Parallel Works

pw auth

pw auth

Authenticate the CLI

Synopsis

The pw auth command grants authorization to the PW CLI using either an API key or a short-term token.

After you enter pw auth, the CLI will prompt you to paste your credential on a new line. On success the credential is saved as a context in ~/.config/pw/credentials and made the current context; manage saved contexts with pw context. Set PW_CREDENTIALS_DIR to store the credentials file somewhere else.

The prompt requires a terminal. For scripts and CI, set the PW_API_KEY environment variable to an API key or token instead; it takes precedence over the credentials file.

On ACTIVATE, the PW CLI is pre-authenticated for user workspaces and existing clusters. You only have to authenticate if you're accessing a cloud cluster or running the PW CLI locally.

Use --context-name to specify a custom name for the context. This is useful if you want multiple contexts for the same user/server combination.

For more information about this process, please see Authentication.

pw auth [flags]

Options

      --context-name string   Name for the context (defaults to user@server)
  -h, --help                  help for auth

Options inherited from parent commands

      --context string         The context to use. Overrides PW_CONTEXT environment variable and current context from config.
      --platform-host string   The Parallel Works ACTIVATE platform host to use. Overrides PW_PLATFORM_HOST environment variable and the current context's server.
  -v, --verbose                Enable verbose logging

SEE ALSO