abhigyanpatwari/GitNexus · error · RegistryNotFoundError
No registered repo matches
Error message
No registered repo matches "${target}".${hint} What it means
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.
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
Defensive patterns
Strategy: validation
Validate before calling
import path from 'node:path';
const registered = entries.some(
(e) =>
path.resolve(e.path) === path.resolve(target) ||
e.name.toLowerCase() === target.toLowerCase(),
);
if (!registered) {
throw new Error(`"${target}" is not registered — run gitnexus analyze first`);
} Prevention
- 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
When it happens
Trigger: `gitnexus remove typo`, or passing -r <name> / an MCP repo argument for a repo that was never analyzed on this machine.
Common situations: 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.
Related errors
- Multiple registered repos match
- Registry name " " is already used by " ". Pass --name to…
- Repository " " not found. Available
- Analysis did not finalize for
- Analysis not finalized: missing registry-entry for
AI-assisted analysis of abhigyanpatwari/GitNexus@0d1aed942f (2026-08-20).
Data as JSON: /api/errors/2ceb648856a82a16.
Report an issue: GitHub.
Appendix: source
Thrown at gitnexus/src/storage/repo-manager.ts:1340
throw new AnalysisNotFinalizedError(
resolved,
storagePath,
'registry-entry',
getGlobalRegistryPath(),
);
}
};
/**
* Thrown by {@link assertSafeStoragePath} when a registry entry's
* `storagePath` does NOT point at the expected `<entry.path>/.gitnexus`
* subfolder. CLI destructive commands (`remove`, `clean --all`) should
* catch this and exit non-zero without deleting anything — the usual
* cause is a corrupted or hand-edited `~/.gitnexus/registry.json`, and
* proceeding would mean `fs.rm(recursive: true)` on whatever odd path
* the entry is pointing at.
*/
export class UnsafeStoragePathError extends Error {
readonly kind = 'UnsafeStoragePathError' as const;
constructor(
public readonly entry: RegistryEntry,
public readonly expectedStoragePath: string,
public readonly actualStoragePath: string,
) {
super(
`Refusing to remove storage path for safety: expected ` +
`"${expectedStoragePath}" under the repo's .gitnexus subfolder, ` +
`but the registry entry has "${actualStoragePath}". ` +
`This usually means the registry entry is corrupted or was ` +
`hand-edited. Delete the entry manually from ~/.gitnexus/registry.json ` +
`and re-run analyze.`,
);
this.name = 'UnsafeStoragePathError';
}
}
View on GitHub (pinned to 0d1aed942f)