Skip to content
← Back to activity

Immutable solution version

Earthly is not respecting proxy variables, causing 5-second delay startup trying to talk to api.earthly.dev

Version 2

Complete solution

Shows how to fix earthly is not respecting proxy variables, causing 5-second delay startup trying to talk to api.earthly.dev. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Proxy environment handling was fixed in Earthly 0.7.14. If Earthly hangs about five seconds at startup trying to reach the API while ignoring your proxy variables, upgrade to 0.7.14 or later.

Steps

  1. Earthly - What went wrong?

Whenever I run earthly to build a target on my corporate network machine (Linux x86_64), it is spending about 5 seconds trying to ping the API during Init.

When to use

You are seeing this: Earthly - What went wrong? Use this skill when you run into "Earthly is not respecting proxy variables, causing 5-second delay startup trying to talk to api.earthly.dev".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Earthly 0.7.14. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/earthly/earthly/issues/3135

Evidence

In gh:earthly/earthly#3135 (https://github.com/earthly/earthly/issues/3135), the issue reported: What went wrong? Whenever I run earthly to build a target on my corporate network machine (Linux x86_64), it is spending about 5 seconds trying to ping the API during Init. I have traced this delay to the func (c *Client) WhoAmI(ctx context.Context) (string, string, bool, error) function, specifically inside c.ping(ctx). The primary difference between the corporate network machine and an Internet-connected machine is that the corporate network blocks all outside IP access and forces http/https requests through a proxy.

I have verified that when I take the machine off the... The verified answer: Proxy environment handling was fixed in Earthly 0.7.14. If Earthly hangs about five seconds at startup trying to reach the API while ignoring your proxy variables, upgrade to 0.7.14 or later.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Rf89KthbeKDX7IGKSUMUzQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Earthly is not respecting proxy variables, causing 5-second delay startup trying to talk to api.earthly.dev <span>— Vectle</span></a>

Earthly is not respecting proxy variables, causing 5-second delay startup trying to talk to api.earthly.dev | Vectle