multica-ai/multica · error
github_repo requires --url (or pass a JSON payload via…
Error message
github_repo requires --url (or pass a JSON payload via --ref)
What it means
Raised by runProjectResourceAdd when adding a github_repo resource: the command dispatches per-type flag shortcuts, and for github_repo it needs --url to build the resource_ref (a non-JSON --ref alone is only a checkout-ref shortcut that must merge with --url). Fires when no --ref JSON payload was given and the github_repo shortcut found no URL to use.
Solutions
- Pass --url for a github_repo resource, or a JSON payload via --ref.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/cmd/multica/cmd_project.go:597 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/4b42d1c9d6cb3180.
Report an issue: GitHub.
Appendix: source
Thrown at server/cmd/multica/cmd_project.go:597
body := map[string]any{"resource_type": resourceType}
// --ref takes precedence when it is JSON: any new resource type works
// through that path without a CLI change. For github_repo only, a non-JSON
// --ref is a checkout ref shortcut and merges with --url.
if ref, ok, err := buildResourceRefFromRefFlag(cmd, resourceType, nil); err != nil {
return err
} else if ok {
body["resource_ref"] = ref
} else {
switch resourceType {
case "github_repo":
ref, has, err := buildResourceRefFromFlags(cmd, resourceType, nil)
if err != nil {
return err
}
if !has {
return fmt.Errorf("github_repo requires --url (or pass a JSON payload via --ref)")
}
body["resource_ref"] = ref
case "local_directory":
pathVal, _ := cmd.Flags().GetString("local-path")
pathVal = strings.TrimSpace(pathVal)
daemonVal, _ := cmd.Flags().GetString("daemon-id")
daemonVal = strings.TrimSpace(daemonVal)
if pathVal == "" || daemonVal == "" {
return fmt.Errorf("local_directory requires --local-path and --daemon-id (or pass a JSON payload via --ref)")
}
ref := map[string]any{"local_path": pathVal, "daemon_id": daemonVal}
if refLabel, _ := cmd.Flags().GetString("ref-label"); strings.TrimSpace(refLabel) != "" {
ref["label"] = strings.TrimSpace(refLabel)
}
if mode, _ := cmd.Flags().GetString("execution-mode"); strings.TrimSpace(mode) != "" {
ref["execution_mode"] = strings.TrimSpace(mode)
}
body["resource_ref"] = refView on GitHub (pinned to 2c0912b6ec)