{"record":{"id":"59c18b83f8c53437","repo":"phacility/phabricator","slug":"no-identity-s-exists-when-selecting-identities","errorCode":null,"errorMessage":"No identity \"%s\" exists. When selecting identities with \"--raw\", the entire identity must match exactly.","messagePattern":"No identity \"(.+?)\" exists\\. When selecting identities with \"--raw\", the entire identity must match exactly\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php","lineNumber":167,"sourceCode":"    $emails = $args->getArg('email');\n    if ($emails) {\n      $rebuilt_anything = true;\n      $this->rebuildEmails($emails);\n    }\n\n    if ($all_identities || $raw) {\n      $rebuilt_anything = true;\n\n      if ($raw) {\n        $identities = id(new PhabricatorRepositoryIdentityQuery())\n          ->setViewer($viewer)\n          ->withIdentityNames($raw)\n          ->execute();\n\n        $identities = mpull($identities, null, 'getIdentityNameRaw');\n        foreach ($raw as $raw_identity) {\n          if (!isset($identities[$raw_identity])) {\n            throw new PhutilArgumentUsageException(\n              pht(\n                'No identity \"%s\" exists. When selecting identities with '.\n                '\"--raw\", the entire identity must match exactly.',\n                $raw_identity));\n          }\n        }\n\n        $identity_list = $identities;\n      } else {\n        $identity_query = id(new PhabricatorRepositoryIdentityQuery())\n          ->setViewer($viewer);\n\n        $identity_list = new PhabricatorQueryIterator($identity_query);\n\n        $this->logInfo(\n          pht('REBUILD'),\n          pht('Rebuilding all existing identities.'));\n      }","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php#L149-L185","documentation":"With `--raw`, rebuild-identities looks identities up by exact match on the raw identity string (identityNameRaw — the full author/committer string exactly as it appeared in commit metadata, e.g. `Alice <alice@example.com>`). The query results are keyed by getIdentityNameRaw and every `--raw` value must be one of those keys; a value with no exact match raises this PhutilArgumentUsageException.","triggerScenarios":"Passing only the email when the stored raw string is `Name <email>`; wrong casing, extra whitespace, or different display name; a raw string for which no PhabricatorRepositoryIdentity row exists (commits carrying it were never parsed).","commonSituations":"Assuming `--raw` accepts a bare email or a fuzzy substring; identities created only after commit parsing, so brand-new or never-parsed authors have no row; cut-and-paste from `git log` that mangles whitespace or unicode names.","solutions":["Look up the exact stored string and pass it verbatim, e.g. `SELECT identityNameRaw FROM repository_identity WHERE identityNameRaw LIKE '%alice%';` or inspect the identity in the Diffusion/People UI, then quote it in the shell.","If exact strings are awkward to gather, use `--all-identities` (optionally scoped with `--repository`) instead of `--raw`.","If the identity should exist but does not, reparse the relevant commits first so identity rows get created, then retry."],"exampleFix":"# before\n./bin/repository rebuild-identities --raw 'alice@example.com'\n# Usage exception: No identity \"alice@example.com\" exists...\n\n# after: pass the full raw string exactly as stored\n./bin/repository rebuild-identities --raw 'Alice <alice@example.com>'","handlingStrategy":"validation","validationCode":"# Verify the exact raw string exists before passing --raw\nraw='Alice <alice@example.com>'\ncount=$(mysql -N -B phabricator_repository -e \\\n  \"SELECT COUNT(*) FROM repository_identity WHERE identityNameRaw = '$raw'\")\n[ \"$count\" -ge 1 ] || { echo \"identity not found (exact match required)\" >&2; exit 1; }\n./bin/repository rebuild-identities --raw \"$raw\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat `--raw` as byte-exact: copy the full raw string (display name plus email in angle brackets) from the database or UI.","When unsure of the exact string, fall back to `--all-identities` scoped by `--repository`.","Ensure commits carrying the identity have been parsed first so the identity row exists."],"tags":["php","phabricator","cli","identity","exact-match","rebuild-identities"],"backgroundTag":"identity-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}