{"record":{"id":"712e76ed0dbb9630","repo":"phacility/phabricator","slug":"specify-one-or-more-repositories-to-push-to-mirror","errorCode":null,"errorMessage":"Specify one or more repositories to push to mirrors.","messagePattern":"Specify one or more repositories to push to mirrors\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementMirrorWorkflow.php","lineNumber":29,"sourceCode":"        pht('Push __repository__ to mirrors.'))\n      ->setArguments(\n        array(\n          array(\n            'name' => 'verbose',\n            'help' => pht('Show additional debugging information.'),\n          ),\n          array(\n            'name' => 'repos',\n            'wildcard' => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $repos = $this->loadLocalRepositories($args, 'repos');\n\n    if (!$repos) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify one or more repositories to push to mirrors.'));\n    }\n\n    foreach ($repos as $repo) {\n      echo tsprintf(\n        \"%s\\n\",\n        pht(\n          'Pushing \"%s\" to mirrors...',\n          $repo->getDisplayName()));\n\n      $engine = id(new PhabricatorRepositoryMirrorEngine())\n        ->setRepository($repo)\n        ->setVerbose($args->getArg('verbose'))\n        ->pushToMirrors();\n    }\n\n    echo tsprintf(","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementMirrorWorkflow.php#L11-L47","documentation":"Usage error from `bin/repository mirror`: `loadLocalRepositories($args, 'repos')` resolved to an empty list. The workflow pushes each repository to its configured mirrors via `PhabricatorRepositoryMirrorEngine`, so it requires explicit repository arguments; note it loads only repositories that have local working copies.","triggerScenarios":"Running `./bin/repository mirror` with no arguments; passing callsigns that do not resolve (or resolve to repositories with no local path, which `loadLocalRepositories` filters out).","commonSituations":"Operators want a mirror push for everything and omit targets; a typo'd callsign resolves to nothing and looks like the command 'forgot' its arguments.","solutions":["Pass repository callsigns/IDs: `./bin/repository mirror R1 R2`.","To push all mirrors, enumerate repositories (`./bin/repository list`) and pass the full list.","Verify each target actually has mirrors configured (Repository → Mirrors) and a local clone."],"exampleFix":"// before\n$ ./bin/repository mirror\n[1176] Specify one or more repositories to push to mirrors.\n\n// after\n$ ./bin/repository mirror R1 R2","handlingStrategy":"validation","validationCode":"REPOS=\"$(./bin/repository list | awk '{print $1}' | tr '\\n' ' ')\"\n[ -n \"${REPOS// /}\" ] && ./bin/repository mirror $REPOS","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass repository callsigns explicitly; mirror has no 'all' mode.","Confirm target repos have mirrors configured and local clones before scheduling pushes."],"tags":["phabricator","phorge","cli","usage-error","missing-argument","mirroring"],"backgroundTag":"missing-required-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}