{"record":{"id":"3d2d74c111d86a42","repo":"phacility/phabricator","slug":"the-remote-uri-is-not-formatted-correctly-remote","errorCode":null,"errorMessage":"The remote URI is not formatted correctly. Remote URIs with an explicit protocol should be in the form '%s', not '%s'. The '%s' syntax is only valid in SCP-style URIs.","messagePattern":"The remote URI is not formatted correctly\\. Remote URIs with an explicit protocol should be in the form '(.+?)', not '(.+?)'\\. The '(.+?)' syntax is only valid in SCP-style URIs\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/repository/storage/PhabricatorRepository.php","lineNumber":1653,"sourceCode":"\n    return $this;\n  }\n\n  public static function assertValidRemoteURI($uri) {\n    if (trim($uri) != $uri) {\n      throw new Exception(\n        pht('The remote URI has leading or trailing whitespace.'));\n    }\n\n    $uri_object = new PhutilURI($uri);\n    $protocol = $uri_object->getProtocol();\n\n    // Catch confusion between Git/SCP-style URIs and normal URIs. See T3619\n    // for discussion. This is usually a user adding \"ssh://\" to an implicit\n    // SSH Git URI.\n    if ($protocol == 'ssh') {\n      if (preg_match('(^[^:@]+://[^/:]+:[^\\d])', $uri)) {\n        throw new Exception(\n          pht(\n            \"The remote URI is not formatted correctly. Remote URIs \".\n            \"with an explicit protocol should be in the form \".\n            \"'%s', not '%s'. The '%s' syntax is only valid in SCP-style URIs.\",\n            'proto://domain/path',\n            'proto://domain:/path',\n            ':/path'));\n      }\n    }\n\n    switch ($protocol) {\n      case 'ssh':\n      case 'http':\n      case 'https':\n      case 'git':\n      case 'svn':\n      case 'svn+ssh':\n        break;","sourceCodeStart":1635,"sourceCodeEnd":1671,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/storage/PhabricatorRepository.php#L1635-L1671","documentation":"Error \"The remote URI is not formatted correctly. Remote URIs with an explicit protocol should be in the form '%s', not '%s'. The '%s' syntax is only valid in SCP-style URIs.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/repository/storage/PhabricatorRepository.php:1653 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}