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: help/commands-docs/_ENVIRONMENT.md
+18-9
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,28 @@ You can set these environment variables to change CLI run settings.
8
8
[How to get your account token](https://snyk.co/ucT6J)<br />
9
9
[How to use Service Accounts](https://snyk.co/ucT6L)<br />
10
10
11
-
-`SNYK_API`:
12
-
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies.
13
-
14
11
-`SNYK_CFG_`<KEY>:
15
12
Allows you to override any key that's also available as `snyk config` option.
16
13
17
14
E.g. `SNYK_CFG_ORG`=myorg will override default org option in `config` with "myorg".
18
15
19
16
-`SNYK_REGISTRY_USERNAME`:
20
-
Specify a username to use when connecting to a container registry. Note that using the `--username` flag will
21
-
override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
22
-
17
+
Specify a username to use when connecting to a container registry. Note that using the `--username` flag will
18
+
override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
19
+
23
20
-`SNYK_REGISTRY_PASSWORD`:
24
-
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will
25
-
override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
26
-
21
+
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will
22
+
override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
23
+
24
+
## Connecting to Snyk API
25
+
26
+
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
27
+
28
+
-`SNYK_API`:
29
+
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
30
+
31
+
-`SNYK_HTTP_PROTOCOL_UPGRADE`=0:
32
+
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
33
+
34
+
-`HTTPS_PROXY` and `HTTP_PROXY`:
35
+
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
0 commit comments