Where <absolute-path-to-ca-file> is the location of the CA certificate you wish to add and <registry-hostname> is the hostname of the registry.
For testing purposes, you can also define insecure registries for Earthly to access. Note that the non-test use of insecure registries is strongly discouraged due to the risk of man-in-the-middle (MITM) attacks.
To configure Earthly to use an insecure registry, use the following Earthly config settings.
http = true
insecure = true
In addition, you will need to specify the --insecure flag in any SAVE IMAGE command.
RUN echo "Hello from Earthly!" > motd
ENTRYPOINT cat motd
SAVE IMAGE --push --insecure <registry-hostname>/hello-earthly:with-love
Other BuildKit options
Other settings for configuring registries in Earthly via BuildKit options can be seen below.