Mix "deps.get" could not fetch a dependency
mix deps.get failed to obtain a dependency. A git ref does not exist, authentication failed, or the network call to fetch the package broke.
What this error means
deps.get aborts with a fetch error - a missing git ref, an auth failure, or a Hex network error. Git/auth issues are deterministic; raw network failures are transient.
** (Mix) Command "git fetch --force --quiet ..." failed
fatal: couldn't find remote ref v9.9.9
Unable to fetch dependency :widgetCommon causes
Bad git ref or tag
A dependency points at a branch, tag, or SHA that no longer exists on the remote.
Private repo without credentials
A git dependency over HTTPS/SSH needs credentials CI does not have.
Transient network failure
The ref is valid but the fetch times out or the host returns an error; a re-run succeeds.
How to fix it
Point at a valid ref
Update mix.exs to an existing tag or commit.
{:widget, git: "https://github.com/org/widget.git", tag: "v1.2.0"}Provide credentials for private deps
- Inject a deploy key or token from CI secrets.
- Use SSH or a token-authenticated HTTPS URL.
- Avoid committing credentials into mix.exs.
Re-run on transient failures
A network-level fetch error usually clears on retry. On Latchkey managed runners, self-healing auto-retries transient dependency fetch failures.
How to prevent it
- Pin git deps to immutable tags or SHAs.
- Store git credentials in CI secrets.
- Cache the deps directory between runs.