phacility/phabricator · error · PhutilArgumentUsageException
Storage format "%s" can not generate keys.
Error message
Storage format "%s" can not generate keys.
What it means
Error "Storage format "%s" can not generate keys." thrown in phacility/phabricator.
Source
Thrown at src/applications/files/management/PhabricatorFilesManagementGenerateKeyWorkflow.php:38
public function execute(PhutilArgumentParser $args) {
$type = $args->getArg('type');
if (!strlen($type)) {
throw new PhutilArgumentUsageException(
pht(
'Specify the type of key to generate with --type.'));
}
$format = PhabricatorFileStorageFormat::getFormat($type);
if (!$format) {
throw new PhutilArgumentUsageException(
pht(
'No key type "%s" exists.',
$type));
}
if (!$format->canGenerateNewKeyMaterial()) {
throw new PhutilArgumentUsageException(
pht(
'Storage format "%s" can not generate keys.',
$format->getStorageFormatName()));
}
$material = $format->generateNewKeyMaterial();
$structure = array(
'name' => 'generated-key-'.Filesystem::readRandomCharacters(12),
'type' => $type,
'material.base64' => $material,
);
$json = id(new PhutilJSON())->encodeFormatted($structure);
echo tsprintf(
"%s: %s\n\n%B\n",
pht('Key Material'),View on GitHub (pinned to 5720a38cfe)
When it happens
Trigger: Thrown at src/applications/files/management/PhabricatorFilesManagementGenerateKeyWorkflow.php:38 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/bd78f3dd53ad223b.
Report an issue: GitHub.