{"record":{"id":"410507c4b93f82e7","repo":"phacility/phabricator","slug":"object-s-claims-s-is-a-github-repository-u","errorCode":null,"errorMessage":"Object (\"%s\") claims \"%s\" is a GitHub repository URI, but the domain does not appear to be GitHub.","messagePattern":"Object \\(\"(.+?)\"\\) claims \"(.+?)\" is a GitHub repository URI, but the domain does not appear to be GitHub\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php","lineNumber":111,"sourceCode":"\n    $object = $buildable->getBuildableObject();\n    $object_phid = $object->getPHID();\n    if (!($object instanceof HarbormasterCircleCIBuildableInterface)) {\n      throw new Exception(\n        pht(\n          'Object (\"%s\") does not implement interface \"%s\". Only objects '.\n          'which implement this interface can be built with CircleCI.',\n          $object_phid,\n          'HarbormasterCircleCIBuildableInterface'));\n    }\n\n    $github_uri = $object->getCircleCIGitHubRepositoryURI();\n    $build_type = $object->getCircleCIBuildIdentifierType();\n    $build_identifier = $object->getCircleCIBuildIdentifier();\n\n    $path = self::getGitHubPath($github_uri);\n    if ($path === null) {\n      throw new Exception(\n        pht(\n          'Object (\"%s\") claims \"%s\" is a GitHub repository URI, but the '.\n          'domain does not appear to be GitHub.',\n          $object_phid,\n          $github_uri));\n    }\n\n    $path_parts = trim($path, '/');\n    $path_parts = explode('/', $path_parts);\n    if (count($path_parts) < 2) {\n      throw new Exception(\n        pht(\n          'Object (\"%s\") claims \"%s\" is a GitHub repository URI, but the '.\n          'path (\"%s\") does not have enough components (expected at least '.\n          'two).',\n          $object_phid,\n          $github_uri,\n          $path));","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php#L93-L129","documentation":"Thrown by Phabricator's Harbormaster \"Build with CircleCI\" step when the buildable object's getCircleCIGitHubRepositoryURI() returns a URI whose host is not exactly github.com or www.github.com (case-insensitive). The step derives the CircleCI project from a GitHub owner/repo path, so it refuses to run against anything that is not GitHub-hosted. getGitHubPath() (src/applications/harbormaster/step/HarbormasterCircleCIBuildStepImplementation.php:68) does the host check and returns null for every other domain.","triggerScenarios":"Executing a build plan containing the CircleCI step against a buildable whose repository URI points to gitlab.com, bitbucket.org, a self-hosted git server, or a URI with an empty/unparseable domain. Concretely: a Differential revision whose repository staging area is not hosted on GitHub, or a commit in a repository that is not imported from GitHub.","commonSituations":"Repository is mirrored from GitHub but its canonical remote in Diffusion is an internal host; staging area URI configured on a non-GitHub host; a custom application implements HarbormasterCircleCIBuildableInterface and returns the wrong URI; the CircleCI step was enabled for all build plans instead of only GitHub-hosted repositories.","solutions":["Point the buildable's GitHub repository URI at github.com (for revisions: host the repository staging area on GitHub; for commits: track a repository imported from GitHub).","If you maintain the buildable class, fix getCircleCIGitHubRepositoryURI() so it returns the GitHub-hosted URI (the staging URI for revisions, the GitHub remote for commits).","If the project is not on GitHub, remove the CircleCI step from the build plan and use a step that supports your host (Jenkins, HTTP request, dry run).","Gate the build plan with a build-plan condition so it only runs for buildables whose repository URI is on github.com."],"exampleFix":"// before (custom buildable returns a non-GitHub URI)\npublic function getCircleCIGitHubRepositoryURI() {\n  return 'https://gitlab.example.com/acme/app.git';\n}\n\n// after (return the GitHub-hosted staging URI)\npublic function getCircleCIGitHubRepositoryURI() {\n  return 'https://github.com/acme/app-staging.git';\n}","handlingStrategy":"validation","validationCode":"// Before enabling/running a CircleCI step for a buildable:\n$uri = $object->getCircleCIGitHubRepositoryURI();\nif (HarbormasterCircleCIBuildStepImplementation::getGitHubPath($uri) === null) {\n  // host is not github.com/www.github.com - do not use the CircleCI step\n}","typeGuard":"function isGitHubRepositoryURI($uri) {\n  $domain = phutil_utf8_strtolower((new PhutilURI($uri))->getDomain());\n  return in_array($domain, array('github.com', 'www.github.com'), true);\n}","tryCatchPattern":"try {\n  $step->execute($build, $build_target);\n} catch (Exception $ex) {\n  if (preg_match('/domain does not appear to be GitHub/', $ex->getMessage())) {\n    // configuration problem, not transient: fail fast with a clear message\n  }\n}","preventionTips":["Host repository staging areas on GitHub when building revisions with CircleCI.","Only attach the CircleCI build step to plans for GitHub-hosted repositories.","In custom HarbormasterCircleCIBuildableInterface implementations, unit-test that getCircleCIGitHubRepositoryURI() returns a github.com URI."],"tags":["harbormaster","circleci","github","uri","phabricator"],"backgroundTag":"uri-domain-validation-failed","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}