xai-org/grok-build · warning

Marketplace source already configured: {identity}

Error message

Marketplace source already configured: {identity}

What it means

The marketplace `add` command rejects a source that is already present in the configured marketplace sources list. Before adding, the command builds an identity (git URL or local path) and checks `already_configured` by comparing against existing sources. This is a deliberate guard against duplicate entries in the marketplace config.

Source

Thrown at crates/codegen/xai-grok-pager/src/plugin_cmd.rs:895

        &xai_grok_workspace::permission::resolution::managed_settings().marketplace_allowlist;
    if allowlist.is_restricted() && !allowlist.is_url_allowed(&identity) {
        bail!("Marketplace source blocked: {}", allowlist.block_reason());
    }

    let already_configured = match &input {
        MarketplaceAddInput::GitUrl(git_url) => {
            let normalized = git_url.trim_end_matches(".git");
            sources.iter().any(|s| {
                matches!(&s.kind, SourceKind::Git { url: u, .. }
                    if u.trim_end_matches(".git") == normalized)
            })
        }
        MarketplaceAddInput::LocalPath(path) => sources
            .iter()
            .any(|s| matches!(&s.kind, SourceKind::Local { path: p } if p == path)),
    };
    if already_configured {
        bail!("Marketplace source already configured: {identity}");
    }

    if !force && let MarketplaceAddInput::GitUrl(git_url) = &input {
        xai_grok_plugin_marketplace::git::probe_git_remote(git_url).map_err(|e| {
            anyhow::anyhow!(
                "{e}\nNot adding \"{url}\": it doesn't look like a reachable git repository. \
                 Re-run with --force to add it anyway (e.g. a host only reachable on VPN)."
            )
        })?;
    }

    let name = match &input {
        MarketplaceAddInput::GitUrl(u) => plugin::name_from_url(u),
        MarketplaceAddInput::LocalPath(p) => plugin::name_from_path(p),
    };
    let config_path = xai_grok_config::grok_home().join(xai_grok_config::USER_CONFIG_FILENAME);

    let content = std::fs::read_to_string(&config_path).unwrap_or_default();

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Do nothing — the source is already configured; run `grok marketplace list` to confirm.
  2. If you want to refresh it, use the marketplace update command instead of add.
  3. If a duplicate with different settings is intended, remove the existing source first, then re-add it.

Example fix

// before
grok marketplace add https://github.com/example/plugins.git
// error: already configured
// after
grok marketplace list   # confirm it exists; skip the add
// or: grok marketplace remove <name> && grok marketplace add ...
Defensive patterns

Strategy: validation

Validate before calling

let existing: Vec<String> = list_marketplace_sources();
let identity = match &input {
    MarketplaceAddInput::GitUrl(u) => u.clone(),
    MarketplaceAddInput::LocalPath(p) => p.display().to_string(),
};
if existing.iter().any(|s| s.contains(&identity)) {
    eprintln!("skipping add: already configured: {identity}");
    return Ok(());
}

Prevention

When it happens

Trigger: Running `grok marketplace add` (via marketplace_add, called by run_marketplace) with a GitUrl or LocalPath that matches an existing source entry — a git URL equal to a configured source's URL, or a local path equal to a configured SourceKind::Local path.

Common situations: Re-running an add command from a script or setup README; forgetting the source was added previously; trying to re-add under a different alias name while the underlying URL/path is unchanged.

Related errors


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/95980e3bb34b3431. Report an issue: GitHub.