phacility/phabricator · info · PhutilArgumentUsageException

Specify one or more repositories to clusterize.

Error message

Specify one or more repositories to clusterize.

What it means

Usage error from 'bin/repository clusterize': the wildcard 'repositories' argument resolved to zero repositories, either because no names were given or because none of the given names matched a repository. The workflow moves repositories onto or off an Almanac cluster repository service and needs at least one target repository.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementClusterizeWorkflow.php:37

              'into.'),
          ),
          array(
            'name' => 'remove-service',
            'help' => pht('Take repositories out of a cluster.'),
          ),
          array(
            'name' => 'repositories',
            'wildcard' => true,
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $viewer = $this->getViewer();

    $repositories = $this->loadRepositories($args, 'repositories');
    if (!$repositories) {
      throw new PhutilArgumentUsageException(
        pht('Specify one or more repositories to clusterize.'));
    }

    $service_name = $args->getArg('service');
    $remove_service = $args->getArg('remove-service');

    if ($remove_service && $service_name) {
      throw new PhutilArgumentUsageException(
        pht('Specify --service or --remove-service, but not both.'));
    }

    if (!$service_name && !$remove_service) {
      throw new PhutilArgumentUsageException(
        pht('Specify --service or --remove-service.'));
    }

    if ($remove_service) {
      $service = null;

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Pass one or more repository callsigns, e.g. 'bin/repository clusterize --service repo-cluster ABC DEF'
  2. Verify the repositories exist on /diffusion/ or via repository search
  3. Check spelling and case of callsigns and retry

Example fix

# before
bin/repository clusterize --service repo-cluster

# after
bin/repository clusterize --service repo-cluster ABC
Defensive patterns

Strategy: validation

Validate before calling

// Validate arguments before invoking clusterize
if (empty($argv_repos)) {
  fwrite(STDERR, "usage: bin/repository clusterize --service <name> <REPO...>\n");
  exit(1);
}

Prevention

When it happens

Trigger: Running 'bin/repository clusterize --service X' with no repository names; passing callsigns or monograms that do not resolve to any repository.

Common situations: Admin tests the clustering command before knowing the callsigns; typos or wrong case in callsigns such as rXyz vs XYZ.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/ce479a3303b5cd65. Report an issue: GitHub.