Skip to content

Commit f947f16

Browse files
mgajdakangasta
andauthored
docs: add UPCLOUD_TOKEN mentions to credential documentation (#627)
Co-authored-by: Toni Kangas <kangasta@users.noreply.github.com>
1 parent a271438 commit f947f16

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,16 @@ On bash, the completions depend on `bash-completion` package. Install and config
223223

224224
To be able to manage your UpCloud resources, you need to configure credentials for `upctl` and enable API access for these credentials.
225225

226-
Define the credentials either by setting `UPCLOUD_USERNAME` and `UPCLOUD_PASSWORD` environmental variables or `UPCLOUD_TOKEN` environment variable,
227-
or in the `upctl` config file (default `~/.config/upctl.yaml`, overridable with `--config /path/to/upctl.yaml`):
226+
We recommend using API tokens for authentication. Configure credentials by using `upctl account login --with-token` command to save a token to system keyring, in the `upctl` config file (default `~/.config/upctl.yaml`, overridable with `--config /path/to/upctl.yaml`) or by setting the `UPCLOUD_TOKEN` environment variable. Alternatively, you can use `UPCLOUD_USERNAME` and `UPCLOUD_PASSWORD` environment variables:
228227

229228
```yaml
229+
# recommended: use API token
230+
token: "your-token"
231+
232+
# alternatively, use username and password
230233
username: "your-username"
231234
password: "your-password"
232-
# alternatively, you can use token
233-
token: "your-token"
235+
```
234236
235237
API access can be configured in the UpCloud Hub on [Account page](https://hub.upcloud.com/account/overview) for the main-account and on the [Permissions tab](https://hub.upcloud.com/people/permissions) of the People page for sub-accounts. We recommend you to set up a sub-account specifically for the API usage with its own username and password, as it allows you to assign specific permissions for increased security.
236238

internal/core/core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const rootCmdLongDescription = `UpCloud command-line interface
2323
2424
` + "`" + `upctl` + "`" + ` provides a command-line interface to UpCloud services. It allows you to control your resources from the command line or any compatible interface.
2525
26-
To be able to manage your UpCloud resources, you need to configure credentials for ` + "`" + `upctl` + "`" + ` and enable API access for these credentials. Define the credentials by setting ` + "`" + `UPCLOUD_USERNAME` + "`" + ` and ` + "`" + `UPCLOUD_PASSWORD` + "`" + ` environment variables. API access can be configured on the Account page of the UpCloud Hub. We recommend you to set up a sub-account specifically for the API usage with its own username and password, as it allows you to assign specific permissions for increased security.`
26+
To be able to manage your UpCloud resources, you need to configure credentials for ` + "`" + `upctl` + "`" + `. We recommend using API tokens. Configure credentials by using ` + "`" + `upctl account login --with-token` + "`" + ` command to save a token to system keyring, in ` + "`" + `~/.config/upctl.yaml` + "`" + ` or set the ` + "`" + `UPCLOUD_TOKEN` + "`" + ` environment variable. Alternatively, use ` + "`" + `UPCLOUD_USERNAME` + "`" + ` and ` + "`" + `UPCLOUD_PASSWORD` + "`" + ` environment variables. When using username and password, API access can be configured on the Account page of the UpCloud Hub. We recommend you to set up a sub-account specifically for the API usage with its own credentials, as it allows you to assign specific permissions for increased security.`
2727

2828
// BuildRootCmd builds the root command
2929
func BuildRootCmd(conf *config.Config) cobra.Command {

0 commit comments

Comments
 (0)