{"record":{"id":"4b470b820db14af2","repo":"infiniflow/ragflow","slug":"github-user-or-organization-not-found-self-repo","errorCode":null,"errorMessage":"GitHub user or organization not found: {self.repo_owner}","messagePattern":"GitHub user or organization not found: (.+?)","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/github/connector.py","lineNumber":752,"sourceCode":"                    if total_count == 0:\n                        raise ConnectorValidationError(f\"Found no repos for user: {self.repo_owner}. Does the credential have the right scopes?\")\n\n        except RateLimitExceededException:\n            raise UnexpectedValidationError(\"Validation failed due to GitHub rate-limits being exceeded. Please try again later.\")\n\n        except GithubException as e:\n            if e.status == 401:\n                raise CredentialExpiredError(\"GitHub credential appears to be invalid or expired (HTTP 401).\")\n            elif e.status == 403:\n                raise InsufficientPermissionsError(\"Your GitHub token does not have sufficient permissions for this repository (HTTP 403).\")\n            elif e.status == 404:\n                if self.repositories:\n                    if \",\" in self.repositories:\n                        raise ConnectorValidationError(f\"None of the specified GitHub repositories could be found for owner: {self.repo_owner}\")\n                    else:\n                        raise ConnectorValidationError(f\"GitHub repository not found with name: {self.repo_owner}/{self.repositories}\")\n                else:\n                    raise ConnectorValidationError(f\"GitHub user or organization not found: {self.repo_owner}\")\n            else:\n                raise ConnectorValidationError(f\"Unexpected GitHub error (status={e.status}): {e.data}\")\n\n        except Exception as exc:\n            raise Exception(f\"Unexpected error during GitHub settings validation: {exc}\")\n\n    def validate_checkpoint_json(self, checkpoint_json: str) -> GithubConnectorCheckpoint:\n        return GithubConnectorCheckpoint.model_validate_json(checkpoint_json)\n\n    def retrieve_slim_document(\n        self,\n        start: SecondsSinceUnixEpoch | None = None,\n        end: SecondsSinceUnixEpoch | None = None,\n        callback: Any = None,\n    ) -> GenerateSlimDocumentOutput:\n        start_value = 0.0 if start is None else start\n        end_value = datetime.now(timezone.utc).timestamp() if end is None else end\n        checkpoint = self.build_dummy_checkpoint()","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/github/connector.py#L734-L770","documentation":"ConnectorValidationError raised on HTTP 404 when 'repositories' is unset: the connector tried owner-as-organization (get_organization) then owner-as-user (get_user) and both 404'd, so repo_owner names neither a visible org nor a user. The account either does not exist or is invisible to this token.","triggerScenarios":"repo_owner is a typo/gibberish handle; the org is private and SSO-restricted so it 404s to this token; owner deleted or renamed.","commonSituations":"Misspelled organization name; private enterprise org the token cannot even see (GitHub returns 404 rather than 403 for hidden orgs); renamed org with a stale setting.","solutions":["Confirm the exact org/user login spelling on github.com.","If the org is SSO-protected, authorize the PAT for the org so it becomes visible, then revalidate.","For indexing one known repo, set 'repositories' explicitly to skip owner enumeration entirely."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"owner_exists = any_visible(gh.get_organization, gh.get_user, owner)\nif not owner_exists and not explicit_repositories:\n    warn('owner invisible to this token — typo or SSO-hidden org?')","typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    return 400, str(e)","preventionTips":["Confirm the exact login spelling on github.com (orgs and users share one namespace).","Authorize the PAT for SSO-protected orgs so hidden orgs stop 404ing."],"tags":["github","not-found","http-404","owner"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}