phacility/phabricator · warning · PhutilArgumentUsageException
Specify one or more repositories to pull.
Error message
Specify one or more repositories to pull.
What it means
`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.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php:35
array(
'name' => 'ignore-locality',
'help' => pht(
'Pull even if the repository should not be present on this '.
'host according to repository cluster configuration.'),
),
array(
'name' => 'repos',
'wildcard' => true,
),
));
}
public function execute(PhutilArgumentParser $args) {
$ignore_locality = (bool)$args->getArg('ignore-locality');
$repos = $this->loadLocalRepositories($args, 'repos', $ignore_locality);
if (!$repos) {
throw new PhutilArgumentUsageException(
pht('Specify one or more repositories to pull.'));
}
$console = PhutilConsole::getConsole();
foreach ($repos as $repo) {
$console->writeOut(
"%s\n",
pht(
'Pulling "%s"...',
$repo->getDisplayName()));
id(new PhabricatorRepositoryPullEngine())
->setRepository($repo)
->setVerbose($args->getArg('verbose'))
->pullRepository();
}
$console->writeOut("%s\n", pht('Done.'));View on GitHub (pinned to 5720a38cfe)
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.
Example fix
# before ./bin/repository pull # Usage exception: Specify one or more repositories to pull. # after ./bin/repository pull XYZ # or, from a host that does not host the working copy: ./bin/repository pull XYZ --ignore-locality
Defensive patterns
Strategy: validation
Validate before calling
# Resolve targets before pulling; abort if nothing matches or is local
repos=$(./bin/repository list-repositories)
printf '%s\n' "$repos" | grep -q "^R<callsign>" || { echo "unknown callsign" >&2; exit 1; }
ls "/var/repo/<callsign>" >/dev/null 2>&1 || { echo "not hosted here; use --ignore-locality" >&2; exit 1; }
./bin/repository pull <callsign> Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Specify which subscription to invoice with %s.
- Specify a billing range with %s and %s, or use %s.
- When specifying %s or %s, you must specify both arguments to
- Use either %s or %s and %s to specify the billing range, but
- Flags "--all-repositories" and "--repository" are not compat
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/3e4c45e014296cbf.
Report an issue: GitHub.