{"record":{"id":"43669fbccc586410","repo":"phacility/phabricator","slug":"specified-public-keyfile-s-does-not-exist","errorCode":null,"errorMessage":"Specified public keyfile \"%s\" does not exist!","messagePattern":"Specified public keyfile \"(.+?)\" does not exist!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/auth/management/PhabricatorAuthManagementCachePKCS8Workflow.php","lineNumber":43,"sourceCode":"            'param' => 'keyfile',\n            'help' => pht('Path to corresponding PKCS8 key.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n\n    $public_keyfile = $args->getArg('public');\n    if (!strlen($public_keyfile)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You must specify the path to a public keyfile with %s.',\n          '--public'));\n    }\n\n    if (!Filesystem::pathExists($public_keyfile)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specified public keyfile \"%s\" does not exist!',\n          $public_keyfile));\n    }\n\n    $public_key = Filesystem::readFile($public_keyfile);\n\n    $pkcs8_keyfile = $args->getArg('pkcs8');\n    if (!strlen($pkcs8_keyfile)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You must specify the path to a pkcs8 keyfile with %s.',\n          '--pkc8s'));\n    }\n\n    if (!Filesystem::pathExists($pkcs8_keyfile)) {\n      throw new PhutilArgumentUsageException(\n        pht(","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementCachePKCS8Workflow.php#L25-L61","documentation":"--public was provided, but Filesystem::pathExists() reports no file at that path, so the workflow aborts before Filesystem::readFile() would fail. A pure path-resolution usage error, not a key-format error.","triggerScenarios":"Typo in the path; relative path resolved from a different working directory than assumed; file lives on another host/container than the one running bin/auth.","commonSituations":"Running bin/auth from a different cwd; containerized setups where the key exists only on the host; copy-pasting paths written for another machine.","solutions":["Run ls -l <path> from the exact directory you invoke bin/auth in.","Switch to an absolute path for --public.","Confirm the file exists on the machine actually running the CLI (inside the container, if that is where bin/auth runs)."],"exampleFix":"// before\n./bin/auth cache-pkcs8 --public ./id_rsa.pub --pkcs8 ./key.pkcs8\n// after (absolute paths)\n./bin/auth cache-pkcs8 --public /home/me/.ssh/id_rsa.pub --pkcs8 /tmp/key.pkcs8","handlingStrategy":"validation","validationCode":"# guard with absolute, pre-checked paths\nPUB=$(readlink -f \"$PUB\")\n[ -f \"$PUB\" ] || { echo \"public keyfile missing: $PUB\" >&2; exit 2; }\n./bin/auth cache-pkcs8 --public \"$PUB\" --pkcs8 \"$PKCS8\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer absolute paths for keyfile arguments.","Run ls on the path from the same cwd as bin/auth before invoking.","In containers, confirm the key is mounted where the CLI runs."],"tags":["cli","file-not-found","cache-pkcs8","phabricator"],"backgroundTag":"cli-file-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}