zeroclaw-labs/zeroclaw · error · anyhow::Error
git channel provider `{provider}` requires the `provider-git
Error message
git channel provider `{provider}` requires the `provider-gitea` feature What it means
build_provider selected gitea or forgejo, but this build of zeroclaw-channels was compiled without the provider-gitea cargo feature, so the shared Gitea/Forgejo implementation is cfg'd out and the channel refuses to start at construction.
Source
Thrown at crates/zeroclaw-channels/src/git/channel.rs:130
else {
anyhow::bail!(
"git channel provider `{provider}` requires \
channels.git.<alias>.api_base_url - the instance's API base \
URL including /api/v1, e.g. `https://git.example.org/api/v1` \
(or `https://gitea.com/api/v1` for the public Gitea service). \
No default host is assumed because API requests carry the \
access token"
);
};
Ok(Box::new(super::providers::gitea::GiteaProvider::new(
api_base_url.to_string(),
cfg.access_token.clone(),
cfg.proxy_url.clone(),
)))
}
#[cfg(not(feature = "provider-gitea"))]
{
anyhow::bail!(
"git channel provider `{provider}` requires the `provider-gitea` feature"
);
}
}
other => anyhow::bail!(
"unknown git channel provider `{other}` (supported: github, gitea, forgejo)"
),
}
}
pub struct GitChannel {
cfg: GitConfig,
/// The alias key under `[channels.git.<alias>]` this handle is bound
/// to. Used to scope peer-group lookups and session keys.
alias: String,
/// Resolves inbound external peers from canonical state at message-time.
/// No cache (see AGENTS.md "ABSOLUTE RULE — SINGLE SOURCE OF TRUTH").
peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync>,View on GitHub (pinned to 88bb9c8533)
Solutions
- Enable the feature where you depend on the crate: zeroclaw-channels = { version = "...", features = ["provider-gitea"] } (covers both gitea and forgejo)
- Or use the stock zeroclaw binary whose feature set includes it
- Or switch the channel to a provider that is compiled in
Example fix
# before
zeroclaw-channels = { version = "0.7", default-features = false }
# after
zeroclaw-channels = { version = "0.7", default-features = false, features = ["provider-gitea"] } Defensive patterns
Strategy: validation
Validate before calling
// Inside a crate that depends on zeroclaw-channels: make the requirement explicit
// zeroclaw-channels = { version = "0.7", features = ["provider-gitea"] }
// Then guard config at load time:
if matches!(cfg.provider.as_str(), "gitea" | "forgejo") {
anyhow::bail!("rebuild with --features provider-gitea or change channels.git.<alias>.provider");
} Prevention
- When trimming default features, re-enable provider-gitea if any channel uses gitea or forgejo
- Add a CI check that validates git channel configs against the compiled feature set
When it happens
Trigger: provider = "gitea" or "forgejo" in config on a build of zeroclaw-channels without features = ["provider-gitea"] (e.g. default-features = false downstream builds).
Common situations: Minimal downstream builds that trimmed provider features; switching a channel config to gitea/forgejo on a binary built only with provider-github.
Related errors
- git channel provider `github` requires the `provider-github`
- git channel provider `{provider}` requires channels.git.<ali
- Git channel requires the `channel-git` feature
- Webhook channel requires the `channel-webhook` feature
- channel-whatsapp-web-feature-missing-error
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/64a83d9abc89cb3a.
Report an issue: GitHub.