phacility/phabricator · error · PhutilArgumentUsageException

Unknown repository "%s"!

Error message

Unknown repository "%s"!

What it means

On the `--all` path, reparse resolves the argument as a repository identifier via PhabricatorRepositoryQuery (omnipotent viewer, withIdentifiers). If no repository matches the callsign/monogram/PHID given, the workflow aborts with this PhutilArgumentUsageException.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:156

      // previous to PHP 5.1.0 you would compare with -1, instead of false
      if (false === $min_timestamp) {
        throw new PhutilArgumentUsageException(
          pht(
            "Supplied --min-date is not valid. See help for valid examples.\n".
            "Supplied value: '%s'\n",
            $min_date));
      }
    }

    $commits = array();
    if ($all_from_repo) {
      $repository = id(new PhabricatorRepositoryQuery())
        ->setViewer(PhabricatorUser::getOmnipotentUser())
        ->withIdentifiers(array($all_from_repo))
        ->executeOne();

      if (!$repository) {
        throw new PhutilArgumentUsageException(
          pht('Unknown repository "%s"!', $all_from_repo));
      }

      $query = id(new DiffusionCommitQuery())
        ->setViewer(PhabricatorUser::getOmnipotentUser())
        ->withRepository($repository);

      if ($min_timestamp) {
        $query->withEpochRange($min_timestamp, null);
      }

      if ($importing) {
        $query->withImporting(true);
      }

      $commits = $query->execute();

      if (!$commits) {

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Confirm the identifier: `./bin/repository list-repositories` shows callsigns/monograms; use the repository's PHID for absolute precision.
  2. If the repository was recreated or migrated, update the script's hardcoded callsign.
  3. Check you are connected to the intended environment (correct Phabricator install/config).

Example fix

# before
./bin/repository reparse --all XZY --message   # typo'd callsign
# Usage exception: Unknown repository "XZY"!

# after
./bin/repository reparse --all XYZ --message   # exact callsign from list-repositories
Defensive patterns

Strategy: validation

Validate before calling

# Validate the repository identifier before reparse
./bin/repository list-repositories | grep -q "R<callsign>" || {
  echo "repository not found in this install" >&2; exit 1;
}
./bin/repository reparse --all <callsign> --message

Prevention

When it happens

Trigger: Running `./bin/repository reparse --all XYZ` where XYZ is not an existing repository's callsign, monogram, or PHID — typo, deleted repository, or wrong environment's database.

Common situations: Typos in callsigns; running against a staging/restored database where the repository does not exist; scripts carrying hardcoded callsigns after a repository was recreated.

Related errors


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