{"record":{"id":"ce1f1176543eb496","repo":"phacility/phabricator","slug":"no-repository-s-exists-ce1f11","errorCode":null,"errorMessage":"No repository \"%s\" exists!","messagePattern":"No repository \"(.+?)\" exists!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php","lineNumber":424,"sourceCode":"    array $include,\n    array $exclude,\n    AlmanacDevice $device = null) {\n\n    $query = id(new PhabricatorRepositoryQuery())\n      ->setViewer($this->getViewer());\n\n    if ($include) {\n      $query->withIdentifiers($include);\n    }\n\n    $repositories = $query->execute();\n    $repositories = mpull($repositories, null, 'getPHID');\n\n    if ($include) {\n      $map = $query->getIdentifierMap();\n      foreach ($include as $identifier) {\n        if (empty($map[$identifier])) {\n          throw new Exception(\n            pht(\n              'No repository \"%s\" exists!',\n              $identifier));\n        }\n      }\n    }\n\n    if ($exclude) {\n      $xquery = id(new PhabricatorRepositoryQuery())\n        ->setViewer($this->getViewer())\n        ->withIdentifiers($exclude);\n\n      $excluded_repos = $xquery->execute();\n      $xmap = $xquery->getIdentifierMap();\n\n      foreach ($exclude as $identifier) {\n        if (empty($xmap[$identifier])) {\n          throw new Exception(","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php#L406-L442","documentation":"Exception from PhabricatorRepositoryPullLocalDaemon::loadPullableRepositories(): an identifier passed via the daemon's --repositories argument did not resolve to any repository. The daemon runs PhabricatorRepositoryQuery->withIdentifiers($include) and requires every include identifier (callsign, PHID, or ID) to appear in the identifier map; a miss aborts daemon startup with 'No repository \"X\" exists!'.","triggerScenarios":"Launching the pull daemon with a bad filter, e.g. phd launch repository-pull-locals -- --repositories DOESNOTEXIST, or with a PHID/callsign of a repository that was deleted or never existed. The foreach over $include finds the identifier missing from $query->getIdentifierMap() and throws.","commonSituations":"Typos in callsigns; repository deleted or renamed after the daemon launch script/unit file was written; environments where the callsign contains different casing; scripts copied between instances whose PHIDs do not exist locally.","solutions":["List valid identifiers: use the UI or conduit repository.query, and confirm the callsign/PHID/ID you passed.","Correct the --repositories argument and relaunch the daemon (phd launch repository-pull-locals -- --repositories <callsign>).","If the repository was deleted, remove it from the daemon launch configuration entirely.","For scripts, resolve identifiers dynamically (repository.query) instead of hard-coding PHIDs."],"exampleFix":"# before\nphd launch repository-pull-locals -- --repositories DOESNOTEXIST\n\n# after\nphd launch repository-pull-locals -- --repositories ABCD","handlingStrategy":"validation","validationCode":"// Resolve identifiers before launching the daemon:\n$repos = $conduit->callMethod('repository.query', array(\n  'callsigns' => array('ABCD'),\n));\nif (!$repos) {\n  throw new Exception('Repository ABCD does not exist; fix --repositories.');\n}","typeGuard":"function allRepositoryIdentifiersExist(array $identifiers, $viewer) {\n  $query = id(new PhabricatorRepositoryQuery())\n    ->setViewer($viewer)\n    ->withIdentifiers($identifiers);\n  $query->execute();\n  $map = $query->getIdentifierMap();\n  foreach ($identifiers as $id) {\n    if (empty($map[$id])) { return false; }\n  }\n  return true;\n}","tryCatchPattern":"try {\n  $daemon->run();\n} catch (Exception $ex) {\n  if (preg_match('/No repository \"/', $ex->getMessage())) {\n    // fix the --repositories argument, then relaunch\n  }\n  throw $ex;\n}","preventionTips":["Use conduit repository.query (or the UI) to confirm callsigns before writing launch scripts.","Prefer stable callsigns over PHIDs in long-lived unit files.","Prune daemon launch configs when repositories are deleted or renamed."],"tags":["php","phabricator","daemon","repository","configuration"],"backgroundTag":"repository-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}