{"record":{"id":"2ceb648856a82a16","repo":"abhigyanpatwari/GitNexus","slug":"no-registered-repo-matches-target-hint","errorCode":null,"errorMessage":"No registered repo matches \"${target}\".${hint}","messagePattern":"No registered repo matches \"(.+?)\"\\.(.+?)","errorType":"exception","errorClass":"RegistryNotFoundError","httpStatus":null,"severity":"error","filePath":"gitnexus/src/storage/repo-manager.ts","lineNumber":1340,"sourceCode":"    throw new AnalysisNotFinalizedError(\n      resolved,\n      storagePath,\n      'registry-entry',\n      getGlobalRegistryPath(),\n    );\n  }\n};\n\n/**\n * Thrown by {@link assertSafeStoragePath} when a registry entry's\n * `storagePath` does NOT point at the expected `<entry.path>/.gitnexus`\n * subfolder. CLI destructive commands (`remove`, `clean --all`) should\n * catch this and exit non-zero without deleting anything — the usual\n * cause is a corrupted or hand-edited `~/.gitnexus/registry.json`, and\n * proceeding would mean `fs.rm(recursive: true)` on whatever odd path\n * the entry is pointing at.\n */\nexport class UnsafeStoragePathError extends Error {\n  readonly kind = 'UnsafeStoragePathError' as const;\n  constructor(\n    public readonly entry: RegistryEntry,\n    public readonly expectedStoragePath: string,\n    public readonly actualStoragePath: string,\n  ) {\n    super(\n      `Refusing to remove storage path for safety: expected ` +\n        `\"${expectedStoragePath}\" under the repo's .gitnexus subfolder, ` +\n        `but the registry entry has \"${actualStoragePath}\". ` +\n        `This usually means the registry entry is corrupted or was ` +\n        `hand-edited. Delete the entry manually from ~/.gitnexus/registry.json ` +\n        `and re-run analyze.`,\n    );\n    this.name = 'UnsafeStoragePathError';\n  }\n}\n","sourceCodeStart":1322,"sourceCodeEnd":1358,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/0d1aed942f0e8b5d3bac27519fff441aceea722d/gitnexus/src/storage/repo-manager.ts#L1322-L1358","documentation":"Target resolution missed at every tier: no canonical path match and no case-insensitive name match — the registry has no such repo. The error embeds the available names as a hint, with 'name (/path)' disambiguated labels for names that appear in multiple entries, mirroring the hint shape used by -r <name> errors.","triggerScenarios":"`gitnexus remove typo`, or passing -r <name> / an MCP repo argument for a repo that was never analyzed on this machine.","commonSituations":"Fresh machine or CI container where analyze hasn't run yet; typo or renamed directory; different user account (~/.gitnexus is per-user); the entry was pruned earlier by registry validation because its storage went provably missing.","solutions":["Run gitnexus analyze on the repo first, then retry with its name or absolute path","Compare your spelling against the available-names hint embedded in the error (names match case-insensitively)","Use the absolute repo path to sidestep name issues entirely","If the entry was pruned, re-index to re-register it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import path from 'node:path';\nconst registered = entries.some(\n  (e) =>\n    path.resolve(e.path) === path.resolve(target) ||\n    e.name.toLowerCase() === target.toLowerCase(),\n);\nif (!registered) {\n  throw new Error(`\"${target}\" is not registered — run gitnexus analyze first`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run gitnexus analyze on the repo before scripting remove/-r commands against it","In fresh CI containers, always index before querying or removing","Use absolute paths and check the available-names hint embedded in the error"],"tags":["registry","cli","not-found"],"backgroundTag":"registry-entry-not-found","analyzedSha":"0d1aed942f0e8b5d3bac27519fff441aceea722d","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}