infiniflow/ragflow · error · ConnectorValidationError

None of the specified repositories could be accessed: {valid

Error message

None of the specified repositories could be accessed: {validation_errors}

What it means

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.

Source

Thrown at common/data_source/github/connector.py:705

                    for repo_name in repo_names:
                        if not repo_name:
                            continue

                        try:
                            test_repo = self.github_client.get_repo(f"{self.repo_owner}/{repo_name}")
                            logging.info(f"Successfully accessed repository: {self.repo_owner}/{repo_name}")
                            test_repo.get_contents("")
                            valid_repos = True
                            # If at least one repo is valid, we can proceed
                            break
                        except GithubException as e:
                            validation_errors.append(f"Repository '{repo_name}': {e.data.get('message', str(e))}")

                    if not valid_repos:
                        error_msg = "None of the specified repositories could be accessed: "
                        error_msg += ", ".join(validation_errors)
                        raise ConnectorValidationError(error_msg)
                else:
                    # Single repository (backward compatibility)
                    test_repo = self.github_client.get_repo(f"{self.repo_owner}/{self.repositories}")
                    test_repo.get_contents("")
            else:
                # Try to get organization first
                try:
                    org = self.github_client.get_organization(self.repo_owner)
                    total_count = org.get_repos().totalCount
                    if total_count == 0:
                        raise ConnectorValidationError(f"Found no repos for organization: {self.repo_owner}. Does the credential have the right scopes?")
                except GithubException as e:
                    # Check for missing SSO
                    MISSING_SSO_ERROR_MESSAGE = "You must grant your Personal Access token access to this organization".lower()
                    if MISSING_SSO_ERROR_MESSAGE in str(e).lower():
                        SSO_GUIDE_LINK = (
                            "https://docs.github.com/en/enterprise-cloud@latest/authentication/"
                            "authenticating-with-saml-single-sign-on/"

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Read the per-repo reasons in the message — each 'Repository <name>: <message>' tells you 404 (name/private/no access) vs 403 (permissions).
  2. Fix names or grant the token access (repo scope / fine-grained PAT including those repos), then re-validate.
  3. For SAML orgs, authorize the PAT for SSO (GitHub Settings -> Authorization).
Defensive patterns

Strategy: try-catch

Validate before calling

names = [n.strip() for n in repositories.split(',') if n.strip()]
for name in names:
    try:
        gh.get_repo(f'{owner}/{name}')
    except GithubException:
        flag_name_for_user(name)

Try / catch

try:
    connector.validate_connector_settings()
except ConnectorValidationError as e:
    # e.message lists per-repo reasons; show them per row in the UI
    display_per_repo_errors(e.message)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/fb7066451dd22c4e. Report an issue: GitHub.