jdx/mise · error

offline mode is enabled

Error message

offline mode is enabled

What it means

`push_image` in src/oci/registry.rs requires network access to upload an OCI image to a registry, so it explicitly rejects execution while `Settings::offline()` is true with this guard before parsing the image reference. Unlike reads from a local OCI layout, pushing always contacts the remote registry, so offline mode makes it impossible by definition.

Source

Thrown at src/oci/registry.rs:921

/// 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 afd2eddd3a)

Solutions

  1. Disable offline mode for the push: `MISE_OFFLINE=0 mise oci push ...` or `mise settings set offline false`.
  2. Move the push to a network-enabled step of your pipeline and keep offline mode only for install/resolve steps.
  3. Remove the `offline = true` setting from any project-level mise.toml that unintentionally applies to the push command.

Example fix

// before
[settings]
offline = true

// after
[settings]
# offline removed — required for oci push
Defensive patterns

Strategy: validation

Validate before calling

if crate::config::Settings::get().offline() {
    eprintln!("skipping oci push: offline mode is enabled");
    return;
}
push_image(&dir, reference, update_index).await?;

Prevention

When it happens

Trigger: Calling `push_image` (e.g. via `mise oci push` or an internal OCI publish flow) while `MISE_OFFLINE=1` or `[settings] offline = true` is configured.

Common situations: Publishing a tool image from a CI job that enabled offline mode to speed up/lock down installs; a developer who set offline globally for another task and then runs an image push; stale offline setting left in a project mise.toml.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/060cc978b3a1479d. Report an issue: GitHub.