phacility/phabricator · error · Exception

No repository "%s" exists!

Error message

No repository "%s" exists!

What it means

After parsing the identifier (callsign, ID, or short name), the workflow runs PhabricatorRepositoryQuery with the acting SSH user as viewer. If no repository matches — the identifier is wrong, or the user cannot see it due to view policies — executeOne returns null and this exception throws.

Source

Thrown at src/applications/diffusion/ssh/DiffusionSSHWorkflow.php:235

          '"%s", or "%s".',
          $path,
          '/diffusion/X/',
          '/diffusion/123/',
          '/source/thaumaturgy.git'));
    }

    $identifier = $info['identifier'];
    $base = $info['base'];

    $this->baseRequestPath = $base;

    $repository = id(new PhabricatorRepositoryQuery())
      ->setViewer($viewer)
      ->withIdentifiers(array($identifier))
      ->needURIs(true)
      ->executeOne();
    if (!$repository) {
      throw new Exception(
        pht('No repository "%s" exists!', $identifier));
    }

    $is_cluster = $this->getIsClusterRequest();

    $protocol = PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH;
    if (!$repository->canServeProtocol($protocol, false, $is_cluster)) {
      throw new Exception(
        pht(
          'This repository ("%s") is not available over SSH.',
          $repository->getDisplayName()));
    }

    if ($repository->getVersionControlSystem() != $vcs) {
      $this->raiseWrongVCSException($repository);
    }

    return $repository;

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Open the repository in the web UI as the same user and confirm the callsign or ID in its URI
  2. Check the repository's View policy includes the SSH user (or a project containing them)
  3. For automation, use a dedicated bot account with explicit access and the numeric ID form
Defensive patterns

Strategy: try-catch

Try / catch

try {
  $workflow->executeRepositoryOperations();
} catch (Exception $ex) {
  if (preg_match('/^No repository /', $ex->getMessage())) {
    // report wrong callsign/ID or missing view access to the client
    fwrite(STDERR, $ex->getMessage()."\n");
    return 1;
  }
  throw $ex;
}

Prevention

When it happens

Trigger: git clone ssh://user@host/diffusion/NOPE/ with a typo'd callsign or ID, or cloning a private repository over SSH as a user who lacks its Can View policy (policies silently filter the result to null).

Common situations: Typos in automation URLs; renamed or deleted repositories; policy-restricted repos accessed by service or bot accounts.

Related errors


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