{"record":{"id":"f23d1e2b68f63c4e","repo":"phacility/phabricator","slug":"this-repository-s-is-not-a-git-repository-us","errorCode":null,"errorMessage":"This repository (\"%s\") is not a Git repository. Use \"%s\" to interact with this repository.","messagePattern":"This repository \\(\"(.+?)\"\\) is not a Git repository\\. Use \"(.+?)\" to interact with this repository\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/ssh/DiffusionGitSSHWorkflow.php","lineNumber":57,"sourceCode":"      PhabricatorRepositoryType::REPOSITORY_TYPE_GIT);\n  }\n\n  protected function waitForGitClient() {\n    $io_channel = $this->getIOChannel();\n\n    // If we don't wait for the client to close the connection, `git` will\n    // consider it an early abort and fail. Sit around until Git is comfortable\n    // that it really received all the data.\n    while ($io_channel->isOpenForReading()) {\n      $io_channel->update();\n      $this->getErrorChannel()->flush();\n      PhutilChannel::waitForAny(array($io_channel));\n    }\n  }\n\n  protected function raiseWrongVCSException(\n    PhabricatorRepository $repository) {\n    throw new Exception(\n      pht(\n        'This repository (\"%s\") is not a Git repository. Use \"%s\" to '.\n        'interact with this repository.',\n        $repository->getDisplayName(),\n        $repository->getVersionControlSystem()));\n  }\n\n  protected function newPassthruCommand() {\n    return parent::newPassthruCommand()\n      ->setWillWriteCallback(array($this, 'willWriteMessageCallback'))\n      ->setWillReadCallback(array($this, 'willReadMessageCallback'));\n  }\n\n  protected function newProtocolLog($is_proxy) {\n    if ($is_proxy) {\n      return null;\n    }\n","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/ssh/DiffusionGitSSHWorkflow.php#L39-L75","documentation":"DiffusionGitSSHWorkflow serves git-upload-pack/git-receive-pack over SSH. When the repository identified from the SSH path exists but its version control system is not Git, raiseWrongVCSException throws and names the repository's actual VCS so the right client is used.","triggerScenarios":"Running git clone ssh://<user>@<host>/diffusion/<CALLSIGN>/ (or git fetch/push) against a repository configured as Mercurial or Subversion.","commonSituations":"Copying the wrong clone URL from another repository; creating the repository with the wrong VCS type; muscle-memory git usage on mixed-VCS installs.","solutions":["Use the client matching the repository (hg or svn) with the exact URI shown on its Diffusion main page","If the repository should be Git and is empty or misconfigured, recreate it with the correct VCS type","Check the repository's Version Control System setting under Manage"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm VCS matches before launching the Git SSH workflow\nif ($repository->getVersionControlSystem() !==\n    PhabricatorRepositoryType::REPOSITORY_TYPE_GIT) {\n  // tell the client to use the VCS-appropriate tool\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always copy clone URIs from the repository's Diffusion page rather than guessing","Double-check the VCS type when creating repositories","In mixed-VCS installs, prefix clone URLs per VCS in your documentation"],"tags":["git","ssh","vcs-mismatch"],"backgroundTag":"wrong-vcs-protocol","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}