Environment Variables

This page documents environment variables that affect Antlers behavior.

Credential Variables

Reference environment variables in credentials using { env = "VAR_NAME" }:

[repositories.credentials]
type = "basic"
username = { env = "MAVEN_USER" }
password = { env = "MAVEN_PASS" }

Common Variables

VariableDescription
GITHUB_TOKENGitHub Packages authentication
GITLAB_TOKENGitLab Packages authentication
ARTIFACTORY_USERArtifactory username
ARTIFACTORY_PASSArtifactory password
NEXUS_USERNexus username
NEXUS_PASSNexus password

Allowed Variables

For hermetic workflows, explicitly allow variables:

[env]
allow = ["GITHUB_TOKEN", "MAVEN_USER", "MAVEN_PASS"]

When [env].allow is set, only listed variables can be referenced in credentials. This is enforced by AntlersToml::validate_hermetic() or by integrations that choose to enforce hermetic rules; the CLI does not enforce it yet.

Proxy Configuration

Antlers uses reqwest, which enables system proxy settings by default. The following environment variables are honored by the HTTP client:

VariableDescription
HTTP_PROXY / http_proxyHTTP proxy URL
HTTPS_PROXY / https_proxyHTTPS proxy URL
ALL_PROXY / all_proxyProxy for both HTTP and HTTPS
NO_PROXY / no_proxyComma-separated list of hosts to bypass

Example:

export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,internal.example.com
antlers resolve com.google.guava:guava:33.0.0-jre

Netrc

When using type = "netrc" credentials, the netrc file path can be overridden with:

VariableDescription
NETRCPath to netrc file