phacility/phabricator · info · PhutilArgumentUsageException
User aborted workflow.
Error message
User aborted workflow.
What it means
Raised at the end of the trust-key workflow when the operator declines the final 'Really trust this key?' confirmation. phutil_console_confirm() returned false (answer 'n' or no readable 'y' from stdin), so the workflow converts the decline into a PhutilArgumentUsageException and exits without changing the key: setIsTrusted(1) and save() are never reached.
Source
Thrown at src/applications/almanac/management/AlmanacManagementTrustKeyWorkflow.php:77
"**<bg:red> %s </bg>**\n\n%s\n\n%s\n\n%s",
pht('IMPORTANT!'),
phutil_console_wrap(
pht(
'Trusting a public key gives anyone holding the corresponding '.
'private key complete, unrestricted access to all data. The '.
'private key will be able to sign requests that bypass policy and '.
'security checks.')),
phutil_console_wrap(
pht(
'This is an advanced feature which should normally be used only '.
'when building a cluster. This feature is very dangerous if '.
'misused.')),
pht('This key is associated with device "%s".', $handle->getName()));
$prompt = pht(
'Really trust this key?');
if (!phutil_console_confirm($prompt)) {
throw new PhutilArgumentUsageException(
pht('User aborted workflow.'));
}
$key->setIsTrusted(1);
$key->save();
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
$console->writeOut(
"**<bg:green> %s </bg>** %s\n",
pht('TRUSTED'),
pht('Key %s has been marked as trusted.', $id));
}
}
View on GitHub (pinned to 5720a38cfe)
Solutions
- If you intended to trust the key, re-run the command and answer 'y' at the prompt.
- When automating, supply the confirmation explicitly: printf 'y\n' | ./bin/almanac trust-key --id N (or yes | ...), knowing this trusts the key unattended.
- If you declined deliberately, nothing is broken: the key's isTrusted flag is unchanged; verify in the UI if unsure.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// invoke trust-key workflow
} catch (PhutilArgumentUsageException $ex) {
if ($ex->getMessage() === pht('User aborted workflow.')) {
// Deliberate decline: exit cleanly, key untouched.
exit(0);
}
throw $ex;
} Prevention
- Run trust-key from an interactive TTY when a human should confirm.
- In automation, feed the answer explicitly: printf 'y\n' | ./bin/almanac trust-key --id N.
- Never assume EOF counts as consent - treat non-interactive runs as declines until stdin is wired.
When it happens
Trigger: Executing ./bin/almanac trust-key --id N interactively and answering 'n'; or running it non-interactively (cron, piped stdin, no TTY) where the confirm prompt gets EOF instead of 'y'.
Common situations: Automating trust-key in a deploy script without feeding stdin; operator hesitating at the red 'bypass policy and security checks' warning; CI jobs or SSH sessions without an interactive terminal.
Related errors
- You can only trust keys associated with Almanac devices.
- Specify a public key to revoke trust for with --id.
- No public key exists with ID "%s".
- Public key with ID %s is not trusted.
- 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/8defb0920e008d59.
Report an issue: GitHub.