{"record":{"id":"d39adab38bc9ab2a","repo":"phacility/phabricator","slug":"this-repository-s-is-not-available-over-ssh","errorCode":null,"errorMessage":"This repository (\"%s\") is not available over SSH.","messagePattern":"This repository \\(\"(.+?)\"\\) is not available over SSH\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/ssh/DiffusionSSHWorkflow.php","lineNumber":243,"sourceCode":"    $base = $info['base'];\n\n    $this->baseRequestPath = $base;\n\n    $repository = id(new PhabricatorRepositoryQuery())\n      ->setViewer($viewer)\n      ->withIdentifiers(array($identifier))\n      ->needURIs(true)\n      ->executeOne();\n    if (!$repository) {\n      throw new Exception(\n        pht('No repository \"%s\" exists!', $identifier));\n    }\n\n    $is_cluster = $this->getIsClusterRequest();\n\n    $protocol = PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH;\n    if (!$repository->canServeProtocol($protocol, false, $is_cluster)) {\n      throw new Exception(\n        pht(\n          'This repository (\"%s\") is not available over SSH.',\n          $repository->getDisplayName()));\n    }\n\n    if ($repository->getVersionControlSystem() != $vcs) {\n      $this->raiseWrongVCSException($repository);\n    }\n\n    return $repository;\n  }\n\n  protected function requireWriteAccess($protocol_command = null) {\n    if ($this->hasWriteAccess === true) {\n      return;\n    }\n\n    $repository = $this->getRepository();","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php#L225-L261","documentation":"Before serving SSH, the workflow calls PhabricatorRepository::canServeProtocol(ssh, ...). That returns false when the repository is untracked/inactive for user requests, or when no clone URI observes the builtin SSH protocol with a suitable IO type (Read/Write for pushes; Read or Read/Write for pulls). The exception tells you the repo is not available over SSH.","triggerScenarios":"Pushing to a repository whose SSH URI is set to No I/O or Read Only; cloning over SSH when the builtin ssh URI is disabled or deleted; any SSH access to a repository marked inactive.","commonSituations":"Admins disabling SSH URIs in favor of HTTPS; read-only mirrors; newly created repositories before URI defaults settle; repositories deactivated during maintenance.","solutions":["Go to Diffusion -> Manage Repository -> URIs and add or enable the builtin ssh:// URI with IO type Read & Write (Read is enough for clones)","Activate the repository if it is currently untracked/inactive","Use the HTTP(S) clone URI instead if SSH is intentionally disabled"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm SSH serving is enabled before cloning/pushing\n$protocol = PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH;\nif (!$repository->canServeProtocol($protocol, $is_write)) {\n  // guide the user to the HTTP(S) URI or to enabling the SSH URI\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After creating a repository, confirm its builtin SSH URI exists with the intended IO type","When disabling SSH in favor of HTTPS, update all documented clone URLs","Remember read-only URIs reject pushes even though clones succeed"],"tags":["ssh","uri-configuration","protocol"],"backgroundTag":"protocol-not-available","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}