Skip to content
Latchkey

Yocto Bitbake "do_fetch" failed in CI

The do_fetch task downloads a recipe's sources from the URLs in SRC_URI. It failed because a URL is unreachable, a mirror is down, or a checksum did not match. The fetch happens before any compilation.

What this error means

A bitbake run fails with "ERROR: <recipe> do_fetch: Fetcher failure" and a message about an unreachable URL or a mismatched checksum.

bitbake
ERROR: my-app-1.0-r0 do_fetch: Fetcher failure for URL: 'https://example.com/my-app-1.0.tar.gz'.
Unable to fetch URL from any source.
ERROR: Task (.../my-app.bb:do_fetch) failed with exit code '1'

Common causes

An unreachable or moved source URL

The SRC_URI host is down, the path moved, or the CI network cannot reach it, so the fetcher exhausts all sources.

A checksum mismatch on the downloaded source

The fetched archive does not match the SRC_URI checksums, so do_fetch rejects it as corrupted or changed.

How to fix it

Fix the URL or use a premirror

  1. Confirm the SRC_URI resolves from the CI network.
  2. Point at a stable mirror or set a premirror for reliability.
  3. Re-run the fetch.
recipes-myapp/my-app/my-app.bb
SRC_URI = "https://downloads.example.com/my-app-${PV}.tar.gz"

Update the checksum when the source legitimately changed

If the upstream artifact changed on purpose, update the checksums to the new values.

recipes-myapp/my-app/my-app.bb
SRC_URI[sha256sum] = "<new-sha256>"

How to prevent it

  • Use stable mirrors or a premirror for source downloads.
  • Pin and verify SRC_URI checksums.
  • Cache the Yocto downloads directory between CI runs.

Frequently asked questions

What causes ""do_fetch ... failed""?
The SRC_URI host is down, the path moved, or the CI network cannot reach it, so the fetcher exhausts all sources.
How do I fix "do_fetch ... failed"?
Fix the URL or use a premirror

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card