Global configuration values for earthly can be stored on disk in the configuration file.
By default, earthly reads the configuration file ~/.earthly/config.yml
; however, it can also be overridden with the --config
command flag option.
The earthly config file is a yaml formatted file that looks like:
global:cache_size_mb: <cache_size_mb>git:global:url_instead_of: <url_instead_of><site>:auth: https|sshuser: <username>password: <password><site2>:...
Example:
global:cache_size_mb: 20000git:global:url_instead_of: "[email protected]:=https://localmirror.example.com/"github.com:auth: httpsuser: alicepassword: itsasecret
Specifies the total size of the BuildKit cache, in MB. The BuildKit daemon uses this setting to configure automatic garbage collection of old cache. A value of 0 causes the size to be adaptive depending on how much space is available on your system. The default is 0.
When set to true, disables collecting command line analytics; otherwise, earthly will report anonymized analytics for invokation of the earthly command. For more information see the data collection page.
This option allows you to pass additional options to Docker when starting up the Earthly buildkit daemon. For example, this can be used to bypass user namespacing like so:
global:buildkit_additional_args: ["--userns", "host"]
This option is obsolete and it is ignored. Earthly no longer uses a loop device for its cache.
This option is obsolete and it is ignored. Earthly cache has moved to a Docker volume. For more information see the page on managing cache.
All git configuration is contained under site-specific options.
The git repository hostname. For example github.com
, or gitlab.com
Either ssh
, https
, or auto
(default). If https
is specified, user and password fields are used to authenticate over https when pulling from git for the corresponding site. If auto
is specified earthly will use ssh
when the ssh-agent is running and has at least one key loaded, and will fallback to using https
when no ssh-keys are present.
See the Authentication guide for a guide on setting up authentication.
The https username to use when auth is set to https
. This setting is ignored when auth is ssh
.
The https password to use when auth is set to https
. This setting is ignored when auth is ssh
.
A regular expression defined to match git URLs, defaults to the <site>/([^/]+)/([^/]+)
. For example if the site is github.com
, then the default pattern will match github.com/<user>/<repo>
.
See the Authentication guide for a guide on setting up authentication with self-hosted git repositories.
See the RE2 docs for a complete definition of the supported regular expression syntax.
If specified, a regular expression substitution will be preformed to determine which URL is cloned by git. Values like $1
, $2
, ... will be replaced with matched subgroup data. If no substitute is given, a URL will be created based on the requested SSH authentication mode.
See the Authentication guide for a guide on setting up authentication with self-hosted git repositories.