Environment Variables¶
The following environment variables can be used with argocd CLI:
| Environment Variable | Description |
|---|---|
ARGOCD_SERVER |
the address of the Argo CD server without https:// prefix (instead of specifying --server for every command) eg. ARGOCD_SERVER=argocd.example.com if served through an ingress with DNS |
ARGOCD_AUTH_TOKEN |
the Argo CD apiKey for your Argo CD user to be able to authenticate |
ARGOCD_OPTS |
command-line options to pass to argocd CLI eg. ARGOCD_OPTS="--grpc-web" |
ARGOCD_CONFIG_DIR |
sets the directory hosting argocd CLI config, e.g., ~/.config/argocd/config. (if ENV var not provided, defaults to $XDG_CONFIG_HOME/argocd, or ~/.config/argocd, or if exists legacy ~/.argocd) |
ARGOCD_SERVER_NAME |
the Argo CD API Server name (default "argocd-server") |
ARGOCD_REPO_SERVER_NAME |
the Argo CD Repository Server name (default "argocd-repo-server") |
ARGOCD_APPLICATION_CONTROLLER_NAME |
the Argo CD Application Controller name (default "argocd-application-controller") |
ARGOCD_REDIS_NAME |
the Argo CD Redis name (default "argocd-redis") |
ARGOCD_REDIS_HAPROXY_NAME |
the Argo CD Redis HA Proxy name (default "argocd-redis-ha-haproxy") |
ARGOCD_REDIS_KEY_PREFIX |
the Argo CD Redis keys prefix (default "") |
ARGOCD_GRPC_KEEP_ALIVE_MIN |
defines the GRPCKeepAliveEnforcementMinimum, used in the grpc.KeepaliveEnforcementPolicy. Expects a "Duration" format (default 10s). |
Proxy environment variables¶
For gRPC-web connections, the argocd CLI honors the standard HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment
variables (and their lowercase equivalents), following Go's
http.ProxyFromEnvironment rules. Connections to the API server
use HTTPS unless --plaintext is given, so HTTPS_PROXY is normally the variable that applies. Requests to
localhost and loopback addresses are never proxied, and hosts matched by NO_PROXY bypass the proxy.
Plain gRPC connections, i.e. those made without --grpc-web, do not use HTTP_PROXY/HTTPS_PROXY. They only support
a SOCKS5 proxy configured through ALL_PROXY. If your environment provides an HTTP proxy only, pass --grpc-web or
set ARGOCD_OPTS="--grpc-web".