added example of setting environment variable in cli doc, updated wording

pull/118/head
Scott Anderson 2019-04-02 08:06:36 -06:00
parent 4dec94d2c5
commit 1d894e1ce5
1 changed files with 6 additions and 1 deletions

View File

@ -24,9 +24,14 @@ influx [command]
{{% note %}}
#### Store your InfluxDB authentication token
To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/)
with each `influx` command, store your token using one of the following methods:
with each `influx` command, use one of the following methods to store your token:
1. Set the `INFLUX_TOKEN` environment variable using your token.
```bash
export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO==
```
2. Store your token in `~/.influxdbv2/credentials`.
_The content of the `credentials` file should be only your token._