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
Copy file name to clipboardExpand all lines: src/collections/_documentation/cli/configuration.md
+25-12Lines changed: 25 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -3,31 +3,44 @@ 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:
8
+
-`project:read`
9
+
-`project:releases`
10
+
-`org:read`
13
11
14
-
-`project:read`
15
-
-`project:releases`
16
-
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 `~/.sentrycli` 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 `~/.sentrycli`:
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
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.
0 commit comments