phacility/phabricator · error · Exception

Attempting to build a repository command (for repository "%s

Error message

Attempting to build a repository command (for repository "%s"), but the CommandEngine is configured to connect as both the current cluster device ("%s") and with a specific credential ("%s"). These options are mutually exclusive. Connections must authenticate as one or the other, not both.

What it means

Error "Attempting to build a repository command (for repository "%s"), but the CommandEngine is configured to connect as both the current cluster device ("%s") and with a specific credential ("%s"). These options are mutually exclusive. Connections must authenticate as one or the other, not both." thrown in phacility/phabricator.

Source

Thrown at src/applications/diffusion/protocol/DiffusionCommandEngine.php:202

    $env['PHABRICATOR_ENV'] = PhabricatorEnv::getSelectedEnvironmentName();

    $as_device = $this->getConnectAsDevice();
    $credential_phid = $this->getCredentialPHID();

    if ($as_device) {
      $device = AlmanacKeys::getLiveDevice();
      if (!$device) {
        throw new Exception(
          pht(
            'Attempting to build a repository command (for repository "%s") '.
            'as device, but this host ("%s") is not configured as a cluster '.
            'device.',
            $repository->getDisplayName(),
            php_uname('n')));
      }

      if ($credential_phid) {
        throw new Exception(
          pht(
            'Attempting to build a repository command (for repository "%s"), '.
            'but the CommandEngine is configured to connect as both the '.
            'current cluster device ("%s") and with a specific credential '.
            '("%s"). These options are mutually exclusive. Connections must '.
            'authenticate as one or the other, not both.',
            $repository->getDisplayName(),
            $device->getName(),
            $credential_phid));
      }
    }


    if ($this->isAnySSHProtocol()) {
      if ($credential_phid) {
        $env['PHABRICATOR_CREDENTIAL'] = $credential_phid;
      }
      if ($as_device) {

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/diffusion/protocol/DiffusionCommandEngine.php:202 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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