phacility/phabricator · error · PhutilArgumentUsageException
Repository " " does not exist.
Error message
Repository "%s" does not exist.
What it means
`diviner generate --repository <identifier>` attaches the generated docs to a Phabricator repository for publishing. The identifier is resolved with PhabricatorRepositoryQuery::withIdentifiers() executed as the omnipotent user; when executeOne() returns null, this usage exception is thrown. It means no repository matches the identifier you passed (callsign or other repository identifier, depending on the Phabricator version).
Solutions
- List valid repositories with `bin/repository list` and copy the exact identifier
- Create the repository in Diffusion first if it does not exist yet
- Omit `--repository` if the documentation does not need repository linking
Example fix
# before diviner generate --book docs/book.book --repository rXmp # after (use the real callsign) diviner generate --book docs/book.book --repository XMP
Defensive patterns
Strategy: validation
Validate before calling
$identifier = $args->getArg('repository');
if ($identifier !== null && strlen($identifier)) {
$repo = id(new PhabricatorRepositoryQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withIdentifiers(array($identifier))
->executeOne();
if (!$repo) {
// Resolve a valid identifier (e.g. from bin/repository list) before continuing.
throw new Exception('Unknown repository: '.$identifier);
}
} Prevention
- Source --repository values from `bin/repository list` output, never hand-typing
- Create the Diffusion repository before wiring docs generation to it
- Assert the identifier resolves in a pre-flight step in build scripts
When it happens
Trigger: Passing an identifier that does not match any existing repository: wrong callsign (including wrong case), a repository that has not been created yet, or an identifier from a different Phabricator instance.
Common situations: Copy-pasting a callsign with the wrong case or with extra characters; documenting a repository before creating it in Diffusion; using a monogram/PHID where the query expects a callsign-style identifier.
Related errors
- Atomizer class ' ' must be a concrete subclass of .
- Publisher class ' ' must be a concrete subclass of .
- Specify an atomizer class with
- There are no Diviner
- Another process is currently discovering repository
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/14837d8d9c863063.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/diviner/workflow/DivinerGenerateWorkflow.php:204
if (!$symbols) {
throw new PhutilArgumentUsageException(
pht(
"Publisher class '%s' must be a concrete subclass of %s.",
$publisher_class,
'DivinerPublisher'));
}
$publisher = newv($publisher_class, array());
$identifier = $args->getArg('repository');
$repository = null;
if ($identifier !== null && strlen($identifier)) {
$repository = id(new PhabricatorRepositoryQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withIdentifiers(array($identifier))
->executeOne();
if (!$repository) {
throw new PhutilArgumentUsageException(
pht(
'Repository "%s" does not exist.',
$identifier));
}
$publisher->setRepositoryPHID($repository->getPHID());
}
$this->publishDocumentation($args->getArg('clean'), $publisher);
}
/* -( Atom Cache )--------------------------------------------------------- */
private function buildAtomCache() {
$this->log(pht('BUILDING ATOM CACHE'));
View on GitHub (pinned to 5720a38cfe)