{"record":{"id":"fb7066451dd22c4e","repo":"infiniflow/ragflow","slug":"none-of-the-specified-repositories-could-be-access","errorCode":null,"errorMessage":"None of the specified repositories could be accessed: {validation_errors}","messagePattern":"None of the specified repositories could be accessed: (.+?)","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/github/connector.py","lineNumber":705,"sourceCode":"\n                    for repo_name in repo_names:\n                        if not repo_name:\n                            continue\n\n                        try:\n                            test_repo = self.github_client.get_repo(f\"{self.repo_owner}/{repo_name}\")\n                            logging.info(f\"Successfully accessed repository: {self.repo_owner}/{repo_name}\")\n                            test_repo.get_contents(\"\")\n                            valid_repos = True\n                            # If at least one repo is valid, we can proceed\n                            break\n                        except GithubException as e:\n                            validation_errors.append(f\"Repository '{repo_name}': {e.data.get('message', str(e))}\")\n\n                    if not valid_repos:\n                        error_msg = \"None of the specified repositories could be accessed: \"\n                        error_msg += \", \".join(validation_errors)\n                        raise ConnectorValidationError(error_msg)\n                else:\n                    # Single repository (backward compatibility)\n                    test_repo = self.github_client.get_repo(f\"{self.repo_owner}/{self.repositories}\")\n                    test_repo.get_contents(\"\")\n            else:\n                # Try to get organization first\n                try:\n                    org = self.github_client.get_organization(self.repo_owner)\n                    total_count = org.get_repos().totalCount\n                    if total_count == 0:\n                        raise ConnectorValidationError(f\"Found no repos for organization: {self.repo_owner}. Does the credential have the right scopes?\")\n                except GithubException as e:\n                    # Check for missing SSO\n                    MISSING_SSO_ERROR_MESSAGE = \"You must grant your Personal Access token access to this organization\".lower()\n                    if MISSING_SSO_ERROR_MESSAGE in str(e).lower():\n                        SSO_GUIDE_LINK = (\n                            \"https://docs.github.com/en/enterprise-cloud@latest/authentication/\"\n                            \"authenticating-with-saml-single-sign-on/\"","sourceCodeStart":687,"sourceCodeEnd":723,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/github/connector.py#L687-L723","documentation":"ConnectorValidationError raised in multi-repo validation after every listed repository failed the access probe. For each name the connector calls github_client.get_repo('owner/name') and get_contents(''); each GithubException message is appended, and if none succeeded, all errors are joined into one message. It means the token authenticated but could not read any requested repo.","triggerScenarios":"repositories='repo-a,repo-b' where get_repo or get_contents raises GithubException for every entry: wrong names, private repos the token cannot see, or org SSO not granted.","commonSituations":"Fine-grained PAT without access to the private repos; typo'd repo names; token scoped to a different org; SAML-protected org where the PAT was never authorized.","solutions":["Read the per-repo reasons in the message — each 'Repository <name>: <message>' tells you 404 (name/private/no access) vs 403 (permissions).","Fix names or grant the token access (repo scope / fine-grained PAT including those repos), then re-validate.","For SAML orgs, authorize the PAT for SSO (GitHub Settings -> Authorization)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"names = [n.strip() for n in repositories.split(',') if n.strip()]\nfor name in names:\n    try:\n        gh.get_repo(f'{owner}/{name}')\n    except GithubException:\n        flag_name_for_user(name)","typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    # e.message lists per-repo reasons; show them per row in the UI\n    display_per_repo_errors(e.message)","preventionTips":["Pre-check repo visibility with gh repo view or GET /repos/{owner}/{repo} before configuring.","Prefer fine-grained PATs with an explicit repository allowlist matching the configured names."],"tags":["github","permissions","validation","repositories"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}