infiniflow/ragflow · error · ConnectorValidationError

Invalid connector settings: No valid repository names provid

Error message

Invalid connector settings: No valid repository names provided.

What it means

ConnectorValidationError raised in the multi-repository branch: when the 'repositories' setting contains a comma, it is split and stripped into repo_names, and if that list is empty the connector refuses to continue. In practice this is only reachable when repositories is a string of commas/whitespace (e.g. ', ,'), because a comma must be present for this branch to run.

Source

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

        end: SecondsSinceUnixEpoch,
        checkpoint: GithubConnectorCheckpoint,
    ) -> CheckpointOutput[GithubConnectorCheckpoint]:
        return self._load_from_checkpoint(start, end, checkpoint, include_permissions=True)

    def validate_connector_settings(self) -> None:
        if self.github_client is None:
            raise ConnectorMissingCredentialError("GitHub credentials not loaded.")

        if not self.repo_owner:
            raise ConnectorValidationError("Invalid connector settings: 'repo_owner' must be provided.")

        try:
            if self.repositories:
                if "," in self.repositories:
                    # Multiple repositories specified
                    repo_names = [name.strip() for name in self.repositories.split(",")]
                    if not repo_names:
                        raise ConnectorValidationError("Invalid connector settings: No valid repository names provided.")

                    # Validate at least one repository exists and is accessible
                    valid_repos = False
                    validation_errors = []

                    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))}")

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Set repositories to real names, e.g. 'repo-a,repo-b', or remove the setting to index the whole org.
  2. Filter/sanitize the input in the form layer: reject values with no valid names before save.
  3. For a single repo, use the bare name without commas so the single-repo branch runs.

Example fix

// before
connector.repositories = ", ,"

// after
connector.repositories = "frontend,backend"
Defensive patterns

Strategy: validation

Validate before calling

names = [n.strip() for n in repositories.split(',') if n.strip()]
if ',' in repositories and not names:
    raise ValueError('repositories must contain at least one real name')

Try / catch

try:
    connector.validate_connector_settings()
except ConnectorValidationError as e:
    return 400, str(e)

Prevention

When it happens

Trigger: repositories set to something like ',' or ' , ' — contains a comma but yields no non-empty names after split().strip(), so repo_names is empty.

Common situations: User pastes a trailing comma or accidental comma-only value into the repositories field; automated config generation emitting ', ' placeholders.

Related errors


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