|
1 | 1 | # Access key / API token
|
2 | 2 |
|
3 |
| -[All API requests require authentication][1]. Provide a valid access key of your Gradle Enterprise instance as the `DEVELOCITY_API_TOKEN` environment variable. |
| 3 | +[All API requests require authentication][1]. Provide a valid access key of your Develocity instance |
| 4 | +as the `DEVELOCITY_API_TOKEN` environment variable. |
4 | 5 |
|
5 | 6 | ## How to get an access key
|
6 | 7 |
|
7 |
| -1. Sign in to Gradle Enterprise (with a user that has “Export build data” permission) |
| 8 | +1. Sign in to Develocity (with a user that has “Export build data” permission) |
8 | 9 | 2. Go to "My settings" from the user menu in the top right-hand corner of the page
|
9 | 10 | 3. Go to "Access keys" from the sidebar
|
10 | 11 | 4. Click "Generate" on the right-hand side
|
|
13 | 14 | ## Migrating from macOS keychain support
|
14 | 15 |
|
15 | 16 | This library used to support storing the key in the macOS keychain as `gradle-enterprise-api-kotlin`.
|
16 |
| -This feature was deprecated. You may use the method of your choice (secret managers, password manager CLIs, etc.) to store and retrieve the key to an environment. |
| 17 | +This feature was deprecated in 2023.4.0, then removed in 2024.1.0. You may use the method of your choice |
| 18 | +(secret managers, password manager CLIs, etc.) to store and retrieve the key to an environment. |
17 | 19 |
|
18 | 20 | If you used the key from keychain and need a drop-in replacement:
|
19 | 21 |
|
20 | 22 | ```
|
21 | 23 | # Create an alias in your shell to fetch the key from keychain
|
22 |
| -echo 'alias ge-api-token="security find-generic-password -w -a "$LOGNAME" -s gradle-enterprise-api-kotlin"' >> ~/.zshrc |
| 24 | +echo 'alias dat="security find-generic-password -w -a "$LOGNAME" -s gradle-enterprise-api-kotlin"' >> ~/.zshrc |
23 | 25 |
|
24 | 26 | # Retrieve it to the environment variable before running the program
|
25 |
| -DEVELOCITY_API_TOKEN="$(ge-api-token)" ./my-script.main.kts |
26 |
| -DEVELOCITY_API_TOKEN="$(ge-api-token)" jupyter lab |
27 |
| -DEVELOCITY_API_TOKEN="$(ge-api-token)" idea my-project |
| 27 | +DEVELOCITY_API_TOKEN="$(dat)" ./my-script.main.kts |
| 28 | +DEVELOCITY_API_TOKEN="$(dat)" jupyter lab |
| 29 | +DEVELOCITY_API_TOKEN="$(dat)" idea my-project |
28 | 30 | ```
|
29 | 31 |
|
30 | 32 | [1]: https://docs.gradle.com/enterprise/api-manual/#access_control
|
0 commit comments