{"record":{"id":"a33f58c5eed8ad78","repo":"phacility/phabricator","slug":"the-working-copy-for-this-repository-s-has-no","errorCode":null,"errorMessage":"The working copy for this repository (\"%s\") has not been cloned yet on this machine (\"%s\"). Make sure you have started the daemons. If this problem persists for longer than a clone should take, check the daemon logs (in the Daemon Console) to see if there were errors cloning the repository. Consult the \"Diffusion User Guide\" in the documentation for help setting up repositories.","messagePattern":"The working copy for this repository \\(\"(.+?)\"\\) has not been cloned yet on this machine \\(\"(.+?)\"\\)\\. Make sure you have started the daemons\\. If this problem persists for longer than a clone should take, check the daemon logs \\(in the Daemon Console\\) to see if there were errors cloning the repository\\. Consult the \"Diffusion User Guide\" in the documentation for help setting up repositories\\.","errorType":"exception","errorClass":"DiffusionSetupException","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/request/DiffusionRequest.php","lineNumber":563,"sourceCode":"    if (!Filesystem::pathExists($path)) {\n      $this->raiseCloneException();\n    }\n  }\n\n  protected function raisePermissionException() {\n    $host = php_uname('n');\n    throw new DiffusionSetupException(\n      pht(\n        'The clone of this repository (\"%s\") on the local machine (\"%s\") '.\n        'could not be read. Ensure that the repository is in a '.\n        'location where the web server has read permissions.',\n        $this->getRepository()->getDisplayName(),\n        $host));\n  }\n\n  protected function raiseCloneException() {\n    $host = php_uname('n');\n    throw new DiffusionSetupException(\n      pht(\n        'The working copy for this repository (\"%s\") has not been cloned yet '.\n        'on this machine (\"%s\"). Make sure you have started the '.\n        'daemons. If this problem persists for longer than a clone should '.\n        'take, check the daemon logs (in the Daemon Console) to see if there '.\n        'were errors cloning the repository. Consult the \"Diffusion User '.\n        'Guide\" in the documentation for help setting up repositories.',\n        $this->getRepository()->getDisplayName(),\n        $host));\n  }\n\n  private function queryStableCommit() {\n    $types = array();\n    if ($this->symbolicCommit) {\n      $ref = $this->symbolicCommit;\n    } else {\n      if ($this->supportsBranches()) {\n        $ref = $this->getBranch();","sourceCodeStart":545,"sourceCodeEnd":581,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/request/DiffusionRequest.php#L545-L581","documentation":"If the parent directory is readable but the repository directory itself does not exist (Filesystem::pathExists fails), raiseCloneException throws this DiffusionSetupException: the working copy has not been cloned on this machine yet, and the message points at the daemons because the repository daemon performs clones.","triggerScenarios":"Requesting a hosted or imported repository whose local clone was never created on this host — the daemons were never started, the initial clone is still running, or a previous clone failed and left no directory.","commonSituations":"Fresh installs where bin/phd start was skipped; newly created repositories inside the initial clone window; clones that failed on disk-full or auth errors; cluster nodes that lack their local working copy.","solutions":["Start the daemons with bin/phd start and watch the Daemon Console for the cloning task","Force clone/update directly: bin/repository update <callsign>","Check the daemon logs in the Daemon Console for clone errors (remote auth, disk space, timeouts)","Confirm repository.default-local-path points where the daemons actually write"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Detect a missing working copy before serving the request\nif (!Filesystem::pathExists($repository->getLocalPath())) {\n  // surface 'clone in progress / start the daemons' guidance\n}","typeGuard":null,"tryCatchPattern":"try {\n  $request->validateRepository();\n} catch (DiffusionSetupException $ex) {\n  if (preg_match('/has not been cloned yet/', $ex->getMessage())) {\n    // poll or prompt the user to start daemons / run bin/repository update\n  }\n}","preventionTips":["Run bin/phd start as part of deployment and verify with bin/phd status","After adding repositories, confirm the clone completes in the Daemon Console","On cluster nodes, ensure each node clones before it receives routed traffic"],"tags":["setup","daemons","clone","diffusion"],"backgroundTag":"repository-not-cloned","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}