phacility/phabricator · error · PhutilArgumentUsageException

Config key "%s" is locked and can only be set in local confi

Error message

Config key "%s" is locked and can only be set in local configuration. To learn more, see "%s" in the documentation.

What it means

Error "Config key "%s" is locked and can only be set in local configuration. To learn more, see "%s" in the documentation." thrown in phacility/phabricator.

Source

Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:115

          $value = json_decode($value, true);
          if (!is_array($value)) {
            switch ($type) {
              default:
                $message = pht(
                  'Configuration key "%s" is of type "%s". Specify it in JSON.',
                  $key,
                  $type);
                break;
            }
            throw new PhutilArgumentUsageException($message);
          }
          break;
      }
    }

    $use_database = $args->getArg('database');
    if ($option->getLocked() && $use_database) {
      throw new PhutilArgumentUsageException(
        pht(
          'Config key "%s" is locked and can only be set in local '.
          'configuration. To learn more, see "%s" in the documentation.',
          $key,
          pht('Configuration Guide: Locked and Hidden Configuration')));
    }

    try {
      $option->getGroup()->validateOption($option, $value);
    } catch (PhabricatorConfigValidationException $validation) {
      // Convert this into a usage exception so we don't dump a stack trace.
      throw new PhutilArgumentUsageException($validation->getMessage());
    }

    if ($use_database) {
      $config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
      $config_entry->setValue($value);

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:115 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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