Difference between revisions of "Doctl auth"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
  [[doctl auth init]]
 
  [[doctl auth init]]
  
 +
[[doctl auth list]]
 +
default (current)
 +
 +
<pre>
 +
doctl auth --help
 +
The `doctl auth` commands allow you to authenticate doctl for use with your DigitalOcean account using tokens that you generate in the control panel at https://cloud.digitalocean.com/account/api/tokens.
 +
 +
If you work with a just one account, call `doctl auth init` and supply the token when prompted. This creates an authentication context named `default`.
 +
 +
To switch between multiple DigitalOcean accounts, including team accounts, create named contexts using `doctl auth init --context <name>`, then providing the applicable token when prompted. This saves the token under the name you provide. To switch between contexts, use `doctl auth switch --context <name>`.
 +
 +
To remove accounts from the configuration file, run `doctl auth remove --context <name>`. This removes the token under the name you provide.
 +
 +
Usage:
 +
  doctl auth [command]
 +
 +
Available Commands:
 +
  init        Initialize doctl to use a specific account
 +
  list        List available authentication contexts
 +
  remove      Remove authentication contexts
 +
  switch      Switch between authentication contexts
 +
 +
Flags:
 +
  -h, --help  help for auth
 +
 +
Global Flags:
 +
  -t, --access-token string  API V2 access token
 +
  -u, --api-url string        Override default API endpoint
 +
  -c, --config string        Specify a custom config file (default "/Users/user/Library/Application Support/doctl/config.yaml")
 +
      --context string        Specify a custom authentication context name
 +
      --http-retry-max int    Set maximum number of retries for requests that fail with a 429 or 500-level error (default 5)
 +
      --interactive          Enable interactive behavior. Defaults to true if the terminal supports it (default true)
 +
  -o, --output string        Desired output format [text|json] (default "text")
 +
      --trace                Show a log of network activity while performing a command
 +
  -v, --verbose              Enable verbose output
 +
 +
Use "doctl auth [command] --help" for more information about a command.
 +
</pre>
  
 
== See also ==
 
== See also ==

Latest revision as of 17:56, 10 December 2023

doctl auth init
doctl auth list
default (current)
doctl auth --help
The `doctl auth` commands allow you to authenticate doctl for use with your DigitalOcean account using tokens that you generate in the control panel at https://cloud.digitalocean.com/account/api/tokens.

If you work with a just one account, call `doctl auth init` and supply the token when prompted. This creates an authentication context named `default`.

To switch between multiple DigitalOcean accounts, including team accounts, create named contexts using `doctl auth init --context <name>`, then providing the applicable token when prompted. This saves the token under the name you provide. To switch between contexts, use `doctl auth switch --context <name>`.

To remove accounts from the configuration file, run `doctl auth remove --context <name>`. This removes the token under the name you provide.

Usage:
  doctl auth [command]

Available Commands:
  init        Initialize doctl to use a specific account
  list        List available authentication contexts
  remove      Remove authentication contexts
  switch      Switch between authentication contexts

Flags:
  -h, --help   help for auth

Global Flags:
  -t, --access-token string   API V2 access token
  -u, --api-url string        Override default API endpoint
  -c, --config string         Specify a custom config file (default "/Users/user/Library/Application Support/doctl/config.yaml")
      --context string        Specify a custom authentication context name
      --http-retry-max int    Set maximum number of retries for requests that fail with a 429 or 500-level error (default 5)
      --interactive           Enable interactive behavior. Defaults to true if the terminal supports it (default true)
  -o, --output string         Desired output format [text|json] (default "text")
      --trace                 Show a log of network activity while performing a command
  -v, --verbose               Enable verbose output

Use "doctl auth [command] --help" for more information about a command.

See also[edit]

Advertising: