Skip to main content

astroctl auth login

Login to the application

Synopsis​

Sign in to AstroPulse in the browser, and make sure this machine has a working API key for the organization: one it already holds for that organization is reused, and a new one is created only when it has none that works, or when --new-api-key asks for one. A key it creates is named after the machine: its hostname is stored as the key's name, which --key-name replaces.

Terminal
astroctl auth login [flags]

Examples​

Terminal

# Sign in, reusing this machine's key for the organization
astroctl auth login

# A CI runner names its own key
astroctl auth login --org-id 00000000-0000-0000-0000-000000000000 --key-name ci-deploy

# Ask for a new key even though this machine holds one that works
astroctl auth login --new-api-key

Options​

Terminal
--api-key-duration string API key duration, default is 720h (30 days) (default "720h")
-h, --help help for login
--key-name string Name of an API key login creates, such as ci-deploy (default: this machine's hostname)
--new-api-key Create a new API key even when this machine holds one that works
--org-id string Organization Id (ask your administrator for this)
-p, --print-access-token Print access token

Options inherited from parent commands​

Terminal
-o, --output string Output format (table|json|yaml) (default "table")

SEE ALSO​