Skip to content

Commit 65bd73e

Browse files
authored
fix(CLI releases docs): Add additional required scope for set-commits (#829)
Currently, the CLI authentication docs only list two required scopes - `project:read` and `project:releases`. But as it turns out, you can't use `set-commits` unless you also have `org:read` scope. This adds the missing scope and reorganizes the text a bit.
1 parent 25f59fb commit 65bd73e

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

src/collections/_documentation/cli/configuration.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,47 @@ title: 'Configuration and Authentication'
33
sidebar_order: 1
44
---
55

6-
For most functionality you need to authenticate with Sentry. To sign in via the CLI tool, you can use the _login_ command which will guide you through it:
6+
For most functionality you need to authenticate with Sentry. Setting this up can be done either automatically, using `sentry-cli`, or manually. Either way, you'll need a token with at least the following scopes:
77

8-
```bash
9-
$ sentry-cli login
10-
```
11-
12-
If you want to manually authenticate `sentry-cli` you can go to your to your auth token settings in your user account (User Icon -> API) and generate a new token with at least the following scopes:
13-
14-
- `project:read`
15-
- `project:releases`
8+
- `project:read`
9+
- `project:releases`
10+
- `org:read`
1611

17-
Afterwards, you can export the `SENTRY_AUTH_TOKEN` environment variable:
12+
##### To use the automatic option:
1813

1914
```bash
20-
export SENTRY_AUTH_TOKEN=your-auth-token
15+
$ sentry-cli login
2116
```
2217

23-
Alternatively, you can provide the `--auth-token` command line parameter whenever you invoke `sentry-cli` or add it to your _.sentryclirc_ config file.
18+
This will give you the option to visit your auth token user settings, where you can create a new auth token, or simply copy an existing one. When you return to the CLI, you'll paste in your token and it will get added to `~/.sentryclirc` automatically.
2419

2520
By default, `sentry-cli` will connect to sentry.io but for on-premise you can also sign in elsewhere:
2621

2722
```bash
2823
$ sentry-cli --url https://myserver.invalid/ login
2924
```
3025

26+
##### To authenticate manually:
27+
28+
Visit your [auth token user settings page](https://sentry.io/settings/account/api/auth-tokens/) and create or copy an existing token. Then either:
29+
30+
- add it to `~/.sentryclirc`:
31+
```ini
32+
[auth]
33+
token=your-auth-token
34+
```
35+
- export it as an environment variable:
36+
```bash
37+
export SENTRY_AUTH_TOKEN=your-auth-token
38+
```
39+
- pass it as a parameter when you invoke `sentry-cli`:
40+
```bash
41+
$ sentry-cli --auth-token your-auth-token
42+
```
43+
3144
## Configuration File
3245

33-
The `sentry-cli` tool can be configured with a config file named `.sentryclirc` as well as environment variables and _.env_ files. The config file is looked for upwards from the current path and defaults from _~/.sentryclirc_ are always loaded. You can also override these settings from command line parameters.
46+
The `sentry-cli` tool can be configured with a config file named `.sentryclirc` as well as environment variables and `.env` files. The config file is looked for upwards from the current path and defaults from `~/.sentryclirc` are always loaded. You can also override these settings from command line parameters.
3447

3548
The config file uses standard INI syntax.
3649

@@ -40,7 +53,7 @@ By default `sentry-cli` will connect to sentry.io. For on-prem you can export th
4053
export SENTRY_URL=https://mysentry.invalid/
4154
```
4255

43-
Alternatively you can add it to your `~/.sentryclirc` config. This is also what the _login_ command does:
56+
Alternatively you can add it to your `~/.sentryclirc` config. This is also what the `login` command does:
4457

4558
```ini
4659
[defaults]

0 commit comments

Comments
 (0)