phacility/phabricator · error · PhutilArgumentUsageException

You must specify the email to verify.

Error message

You must specify the email to verify.

What it means

Thrown by `bin/auth verify` when no email address argument is supplied. The workflow defines 'email' as a wildcard argument and requires at least one value before it can look up the PhabricatorUserEmail record to mark verified. It is a usage error raised before any database query.

Source

Thrown at src/applications/auth/management/PhabricatorAuthManagementVerifyWorkflow.php:27

      ->setExamples('**verify** __email__')
      ->setSynopsis(
        pht(
          'Verify an unverified email address which is already attached to '.
          'an account. This will also re-execute event hooks for addresses '.
          'which are already verified.'))
      ->setArguments(
        array(
          array(
            'name' => 'email',
            'wildcard' => true,
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $emails = $args->getArg('email');
    if (!$emails) {
      throw new PhutilArgumentUsageException(
        pht('You must specify the email to verify.'));
    } else if (count($emails) > 1) {
      throw new PhutilArgumentUsageException(
        pht('You can only verify one address at a time.'));
    }
    $address = head($emails);

    $email = id(new PhabricatorUserEmail())->loadOneWhere(
      'address = %s',
      $address);
    if (!$email) {
      throw new PhutilArgumentUsageException(
        pht(
          'No email exists with address "%s"!',
          $address));
    }

    $viewer = $this->getViewer();

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Re-run with exactly one address: `bin/auth verify <user@example.com>`.
  2. In scripts, assert the variable is non-empty before invoking.
  3. Run `bin/auth help verify` to confirm the wildcard argument form.

Example fix

// before
$ bin/auth verify
You must specify the email to verify.

// after
$ bin/auth verify alice@example.com
Defensive patterns

Strategy: validation

Validate before calling

// Shell guard before invoking
if [ -z "$EMAIL" ]; then echo "address required" >&2; exit 2; fi
bin/auth verify "$EMAIL"

Prevention

When it happens

Trigger: Running `bin/auth verify` with no arguments, or via a script where the interpolated address variable is empty.

Common situations: Automation wraps the command with a variable that is unset; the operator expects a prompt; whitespace/quoting mistakes cause the argument to be dropped.

Related errors


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