You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: src/collections/_documentation/cli/configuration.md
+27-14Lines changed: 27 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -3,34 +3,47 @@ title: 'Configuration and Authentication'
3
3
sidebar_order: 1
4
4
---
5
5
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:
7
7
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`
16
11
17
-
Afterwards, you can export the `SENTRY_AUTH_TOKEN` environment variable:
12
+
##### To use the automatic option:
18
13
19
14
```bash
20
-
export SENTRY_AUTH_TOKEN=your-auth-token
15
+
$ sentry-cli login
21
16
```
22
17
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 authtoken, 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.
24
19
25
20
By default, `sentry-cli` will connect to sentry.io but for on-premise you can also sign in elsewhere:
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
+
31
44
## Configuration File
32
45
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.
34
47
35
48
The config file uses standard INI syntax.
36
49
@@ -40,7 +53,7 @@ By default `sentry-cli` will connect to sentry.io. For on-prem you can export th
40
53
export SENTRY_URL=https://mysentry.invalid/
41
54
```
42
55
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:
0 commit comments