phacility/phabricator · error · PhutilArgumentUsageException
No repository service "%s" exists.
Error message
No repository service "%s" exists.
What it means
Usage error from 'bin/repository clusterize': --service <name> was given, but the AlmanacServiceQuery filtered to the cluster repository service type (AlmanacClusterRepositoryServiceType) with active bindings returned no service. Either no Almanac service with that name exists, or one exists but is the wrong service type, or it has no active bindings.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementClusterizeWorkflow.php:67
if (!$service_name && !$remove_service) {
throw new PhutilArgumentUsageException(
pht('Specify --service or --remove-service.'));
}
if ($remove_service) {
$service = null;
} else {
$service = id(new AlmanacServiceQuery())
->setViewer($viewer)
->withNames(array($service_name))
->withServiceTypes(
array(
AlmanacClusterRepositoryServiceType::SERVICETYPE,
))
->needActiveBindings(true)
->executeOne();
if (!$service) {
throw new PhutilArgumentUsageException(
pht(
'No repository service "%s" exists.',
$service_name));
}
}
if ($service) {
$service_phid = $service->getPHID();
$bindings = $service->getActiveBindings();
$unique_devices = array();
foreach ($bindings as $binding) {
$unique_devices[$binding->getDevicePHID()] = $binding->getDevice();
}
if (count($unique_devices) > 1) {
$device_names = mpull($unique_devices, 'getName');View on GitHub (pinned to 5720a38cfe)
Solutions
- Check Almanac (/almanac/) for the exact service name spelling
- Ensure the service type is Cluster Repository (AlmanacClusterRepositoryServiceType)
- Add active bindings to at least one device for that service, then retry
- Run the command as an admin who can see the service
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check the Almanac service exactly as clusterize does:
$service = id(new AlmanacServiceQuery())
->setViewer($viewer)
->withNames(array($service_name))
->withServiceTypes(array(AlmanacClusterRepositoryServiceType::SERVICETYPE))
->needActiveBindings(true)
->executeOne();
if (!$service) {
// fix name, type, or bindings before running clusterize
} Prevention
- Create cluster services with the Cluster Repository service type only
- Bind at least one device and verify bindings are active before clusterizing
- Copy service names verbatim from the Almanac console
When it happens
Trigger: Typo in the service name; the Almanac service was created with a different service type rather than the cluster repository type; the service exists but has no active device bindings; the running admin cannot see the service.
Common situations: Clustering set up partially: service created but bindings to devices never made; name mismatch between the Almanac console and the CLI argument.
Related errors
- Unable to lock repository "%s": only clustered repositories
- No device or service named "%s" exists.
- You can not "--promote" an entire service ("%s"). Only a sin
- Service "%s" is not bound to any devices.
- This server is configured as "%s", but you are using the dom
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/f681448de738ab33.
Report an issue: GitHub.