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.
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
- Confirm the
SRC_URIresolves from the CI network. - Point at a stable mirror or set a premirror for reliability.
- Re-run the fetch.
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.
SRC_URI[sha256sum] = "<new-sha256>"How to prevent it
- Use stable mirrors or a premirror for source downloads.
- Pin and verify
SRC_URIchecksums. - Cache the Yocto downloads directory between CI runs.