{"record":{"id":"3e4c45e014296cbf","repo":"phacility/phabricator","slug":"specify-one-or-more-repositories-to-pull","errorCode":null,"errorMessage":"Specify one or more repositories to pull.","messagePattern":"Specify one or more repositories to pull\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php","lineNumber":35,"sourceCode":"          array(\n            'name' => 'ignore-locality',\n            'help' => pht(\n              'Pull even if the repository should not be present on this '.\n              'host according to repository cluster configuration.'),\n          ),\n          array(\n            'name'      => 'repos',\n            'wildcard'  => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $ignore_locality = (bool)$args->getArg('ignore-locality');\n\n    $repos = $this->loadLocalRepositories($args, 'repos', $ignore_locality);\n    if (!$repos) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify one or more repositories to pull.'));\n    }\n\n    $console = PhutilConsole::getConsole();\n    foreach ($repos as $repo) {\n      $console->writeOut(\n        \"%s\\n\",\n        pht(\n          'Pulling \"%s\"...',\n          $repo->getDisplayName()));\n\n      id(new PhabricatorRepositoryPullEngine())\n        ->setRepository($repo)\n        ->setVerbose($args->getArg('verbose'))\n        ->pullRepository();\n    }\n\n    $console->writeOut(\"%s\\n\", pht('Done.'));","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php#L17-L53","documentation":"`bin/repository pull` fetches new commits into one or more repositories on this host. The wildcard `repos` arguments (callsigns, monograms, or PHIDs) are resolved through loadLocalRepositories(), which keeps only repositories whose local working copy is bound to this device (unless --ignore-locality is passed). When no repository is selected the command refuses to run with this PhutilArgumentUsageException.","triggerScenarios":"Executing `./bin/repository pull` with no arguments; passing a callsign that does not exist or is not hosted on this device; running the command on a web/CI node that hosts no working copies without `--ignore-locality`; all arguments filtered out by the locality check.","commonSituations":"A cron job or monitoring wrapper installed on the wrong host; a typo'd or renamed callsign; a new cluster node that is not yet bound to the repository's Almanac service so it hosts nothing locally.","solutions":["Pass an explicit target: `./bin/repository pull XYZ` (callsign) or a repository PHID.","List valid repositories with `./bin/repository list-repositories` and copy the exact callsign.","Run the command on the device that actually hosts the working copy, or add `--ignore-locality` to bypass the local-host filter.","If this host intentionally hosts nothing, remove the pull job from its cron so the invocation stops failing."],"exampleFix":"# before\n./bin/repository pull\n# Usage exception: Specify one or more repositories to pull.\n\n# after\n./bin/repository pull XYZ\n# or, from a host that does not host the working copy:\n./bin/repository pull XYZ --ignore-locality","handlingStrategy":"validation","validationCode":"# Resolve targets before pulling; abort if nothing matches or is local\nrepos=$(./bin/repository list-repositories)\nprintf '%s\\n' \"$repos\" | grep -q \"^R<callsign>\" || { echo \"unknown callsign\" >&2; exit 1; }\nls \"/var/repo/<callsign>\" >/dev/null 2>&1 || { echo \"not hosted here; use --ignore-locality\" >&2; exit 1; }\n./bin/repository pull <callsign>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass an explicit callsign or PHID to pull commands in scripts; never rely on running everywhere.","Install pull cron jobs only on hosts bound (via Almanac) to the repository working copies.","Use `--ignore-locality` deliberately, not as a blanket default."],"tags":["php","phabricator","cli","repository-pull","usage-error"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}