jdx/mise · error
offline mode is enabled
Error message
offline mode is enabled
What it means
push_image (src/oci/registry.rs:933) refuses to push an OCI image to a registry while offline mode is enabled. Pushing inherently requires network access to the target registry, so the function checks `Settings::get().offline()` first and fails fast rather than making partial uploads that cannot complete.
Solutions
- Disable offline mode: unset MISE_OFFLINE, remove `offline = true` from settings, or drop --offline, then retry the push.
- If the target is a local registry, ensure it's reachable and still disable offline mode — the setting blocks all registry HTTP traffic.
- In CI, scope MISE_OFFLINE only to pull/build steps, not the push step.
- Verify with `mise settings get offline` where the flag originates and remove it there.
Example fix
# before MISE_OFFLINE=1 mise oci push localhost:5000/tools/mytool:1.0 # after unset MISE_OFFLINE mise oci push localhost:5000/tools/mytool:1.0
Defensive patterns
Strategy: validation
Validate before calling
if std::env::var("MISE_OFFLINE").is_ok() {
eprintln!("push skipped: MISE_OFFLINE is set");
std::process::exit(1);
} Try / catch
match push_result {
Err(e) if e.to_string().contains("offline mode is enabled") => {
eprintln!("push requires network; unset MISE_OFFLINE for this step");
}
other => other?,
} Prevention
- Never export MISE_OFFLINE for push/deploy pipeline stages
- Confirm registry reachability in the job before pushing
- Use per-step env overrides in CI instead of job-wide offline flags
When it happens
Trigger: Calling OCI push_image (e.g. via `mise` OCI tool push workflows) with a valid image_dir and reference while MISE_OFFLINE=1 / `[settings] offline = true` / --offline is set. Notably reachable from tests like sparse_push_downloads_missing_bytes_when_head_is_unsupported as well as CLI usage.
Common situations: Running a push step in an offline CI job or air-gapped environment; MISE_OFFLINE left exported from a previous step or shell profile; user expected pushes to use a local registry/daemon but offline mode blocks all network egress.
Related errors
- blob chunk upload failed
- blob upload failed
- starting blob upload failed
- get failed for
- `docker load` failed
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/060cc978b3a1479d.
Report an issue: GitHub.
Appendix: source
Thrown at src/oci/registry.rs:933
/// Push an OCI image layout directory to a registry reference.
///
/// Uploads only blobs the registry doesn't already have (HEAD check per
/// blob), then PUTs the manifest under the reference's tag (or digest).
/// Base-image blobs hosted on the same registry are cross-repo mounted
/// instead of re-uploaded when possible.
///
/// With `update_index`, the manifest is pushed by digest and the tag is
/// updated to an OCI image index that carries one entry per platform —
/// the existing index's other-platform entries are preserved, so runners
/// of different architectures can each push the same tag and end up with
/// a multi-arch image.
pub(crate) async fn push_image(
image_dir: &Path,
reference: &str,
update_index: bool,
) -> Result<PushSummary> {
eyre::ensure!(
!crate::config::Settings::get().offline(),
"offline mode is enabled"
);
let r = Reference::parse(reference)?;
let layout = ImageLayout {
root: image_dir.to_path_buf(),
};
// Resolve the layout's single manifest. `mise oci build` always writes
// exactly one manifest into index.json.
let index_bytes = crate::file::read(image_dir.join("index.json"))?;
let index: ImageIndex = serde_json::from_slice(&index_bytes).wrap_err("parsing index.json")?;
let manifest_desc = match index.manifests.as_slice() {
[one] => one,
[] => bail!("{}: index.json lists no manifests", image_dir.display()),
many => bail!(
"{}: index.json lists {} manifests; multi-manifest layouts are not supported",
image_dir.display(),View on GitHub (pinned to 533346cc37)