{"record":{"id":"de761a6095f2ca82","repo":"infiniflow/ragflow","slug":"github-repository-not-found-with-name-self-repo","errorCode":null,"errorMessage":"GitHub repository not found with name: {self.repo_owner}/{self.repositories}","messagePattern":"GitHub repository not found with name: (.+?)/(.+?)","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/github/connector.py","lineNumber":750,"sourceCode":"                    # Check if we can access any repos\n                    total_count = user.get_repos().totalCount\n                    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","sourceCodeStart":732,"sourceCodeEnd":768,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/github/connector.py#L732-L768","documentation":"ConnectorValidationError raised on HTTP 404 in single-repo mode ('repositories' has no comma). The exact requested pair repo_owner/repositories was not found — either truly absent, private-invisible to this token, or the owner/name split is wrong.","triggerScenarios":"get_repo(f'{repo_owner}/{self.repositories}') or get_contents('') returns 404: nonexistent repo name, private repo with an unprivileged token, or repo_owner pointing at a different account.","commonSituations":"Repo renamed after the connector was configured; case/typo in the name; trying to index another org's private repo; owner/repo order swapped in configuration.","solutions":["Verify the full 'owner/repo' string opens in a browser or via gh repo view.","If private, give the token the 'repo' scope / fine-grained access so the repo is visible (404 becomes 200).","Update the setting if the repository was renamed or transferred."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"try:\n    gh.get_repo(f'{owner}/{repo_name}')\nexcept GithubException as e:\n    if e.status == 404:\n        suggest_name_check(owner, repo_name)","typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    return 400, str(e)","preventionTips":["Verify 'owner/repo' with gh repo view before saving the connector.","Update the setting whenever a repository is renamed or transferred."],"tags":["github","not-found","http-404","single-repo"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}