{"record":{"id":"14837d8d9c863063","repo":"phacility/phabricator","slug":"repository-s-does-not-exist","errorCode":null,"errorMessage":"Repository \"%s\" does not exist.","messagePattern":"Repository \"(.+?)\" does not exist\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/diviner/workflow/DivinerGenerateWorkflow.php","lineNumber":204,"sourceCode":"    if (!$symbols) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          \"Publisher class '%s' must be a concrete subclass of %s.\",\n          $publisher_class,\n          'DivinerPublisher'));\n    }\n    $publisher = newv($publisher_class, array());\n\n    $identifier = $args->getArg('repository');\n    $repository = null;\n    if ($identifier !== null && strlen($identifier)) {\n      $repository = id(new PhabricatorRepositoryQuery())\n        ->setViewer(PhabricatorUser::getOmnipotentUser())\n        ->withIdentifiers(array($identifier))\n        ->executeOne();\n\n      if (!$repository) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Repository \"%s\" does not exist.',\n            $identifier));\n      }\n\n      $publisher->setRepositoryPHID($repository->getPHID());\n    }\n\n    $this->publishDocumentation($args->getArg('clean'), $publisher);\n  }\n\n\n/* -(  Atom Cache  )--------------------------------------------------------- */\n\n\n  private function buildAtomCache() {\n    $this->log(pht('BUILDING ATOM CACHE'));\n","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diviner/workflow/DivinerGenerateWorkflow.php#L186-L222","documentation":"`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).","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\ndiviner generate --book docs/book.book --repository rXmp\n# after (use the real callsign)\ndiviner generate --book docs/book.book --repository XMP","handlingStrategy":"validation","validationCode":"$identifier = $args->getArg('repository');\nif ($identifier !== null && strlen($identifier)) {\n  $repo = id(new PhabricatorRepositoryQuery())\n    ->setViewer(PhabricatorUser::getOmnipotentUser())\n    ->withIdentifiers(array($identifier))\n    ->executeOne();\n  if (!$repo) {\n    // Resolve a valid identifier (e.g. from bin/repository list) before continuing.\n    throw new Exception('Unknown repository: '.$identifier);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["diviner","phabricator","repository","usage-error","identifier"],"backgroundTag":"repository-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}