zeroclaw-labs/zeroclaw · error · anyhow::Error
git channel has no repositories to poll; set `repos` or gran
Error message
git channel has no repositories to poll; set `repos` or grant the provider access to at least one repository
What it means
On listen(), the git channel resolves its poll plan: the repos explicitly configured plus whatever the provider can discover. If that set is empty, polling has nothing to do, which the channel treats as a configuration error and bails — staying silent would hide a broken credential.
Source
Thrown at crates/zeroclaw-channels/src/git/channel.rs:511
"provider": self.provider.name(),
"bot": mention_handle,
"repos": repos.iter().map(ToString::to_string).collect::<Vec<_>>(),
"poll_interval_secs": interval.as_secs(),
"mention_only": self.cfg.mention_only,
"transports": {
"issues": plan.issues,
"comments": plan.comments,
"review_comments": plan.review_comments,
"releases": plan.releases,
"workflow_runs": plan.workflow_runs,
"events_backbone": self.cfg.events_backbone,
},
})
),
"git channel polling"
);
if repos.is_empty() {
anyhow::bail!(
"git channel has no repositories to poll; set `repos` or grant the \
provider access to at least one repository"
);
}
if !plan.any() {
anyhow::bail!(
"git channel `events` routing table ignores every event type; \
nothing would ever be delivered"
);
}
let filter = EventFilter {
bot_login: &bot_login,
mention_handle: &mention_handle,
mention_only: self.cfg.mention_only,
listen_to_bots: self.cfg.listen_to_bots,
};
let mut state = PollState::new(chrono::Utc::now());View on GitHub (pinned to 88bb9c8533)
Solutions
- Install the GitHub App on (or grant the token access to) at least one repository
- Or list repositories explicitly under channels.git.<alias>.repos
- Verify the token/installation actually sees repositories via the provider's API before starting the channel
Example fix
# before [channels.git.mygh] provider = "github" # no repos configured, app not installed anywhere → listen() bails # after [channels.git.mygh] provider = "github" repos = ["myorg/tooling", "myorg/infra"]
Defensive patterns
Strategy: validation
Validate before calling
// Rust — check before listen()
if configured_repos.is_empty() {
let discovered = provider.list_repositories().await?;
if discovered.is_empty() {
anyhow::bail!(
"git channel would poll nothing: set `repos` or grant the provider repository access"
);
}
} Prevention
- Install the GitHub App on target repositories before enabling the channel
- Prefer explicit `repos` lists over relying on discovery
- Startup smoke-test provider credentials against the provider's own API
When it happens
Trigger: channels.git.<alias>.repos is unset/empty AND the provider's repository listing returns nothing: GitHub App not installed on any repository, token with no repository access, or an installation the token cannot see.
Common situations: A new GitHub App that was never installed onto an org/repo; a fine-grained token missing repository access; expecting auto-discovery without granting any access.
Related errors
- git channel: reading private_key_path `{path}` failed: {e}
- git channel provider `{provider}` requires channels.git.<ali
- unknown git channel provider `{other}` (supported: github, g
- git channel `events` routing table ignores every event type;
- start_channels requires at least one enabled [agents.<alias>
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/26071f1937ed6c7c.
Report an issue: GitHub.