infiniflow/ragflow · error · ConnectorValidationError

GitHub user or organization not found: {self.repo_owner}

Error message

GitHub user or organization not found: {self.repo_owner}

What it means

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.

Source

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

                    if total_count == 0:
                        raise ConnectorValidationError(f"Found no repos for user: {self.repo_owner}. Does the credential have the right scopes?")

        except RateLimitExceededException:
            raise UnexpectedValidationError("Validation failed due to GitHub rate-limits being exceeded. Please try again later.")

        except GithubException as e:
            if e.status == 401:
                raise CredentialExpiredError("GitHub credential appears to be invalid or expired (HTTP 401).")
            elif e.status == 403:
                raise InsufficientPermissionsError("Your GitHub token does not have sufficient permissions for this repository (HTTP 403).")
            elif e.status == 404:
                if self.repositories:
                    if "," in self.repositories:
                        raise ConnectorValidationError(f"None of the specified GitHub repositories could be found for owner: {self.repo_owner}")
                    else:
                        raise ConnectorValidationError(f"GitHub repository not found with name: {self.repo_owner}/{self.repositories}")
                else:
                    raise ConnectorValidationError(f"GitHub user or organization not found: {self.repo_owner}")
            else:
                raise ConnectorValidationError(f"Unexpected GitHub error (status={e.status}): {e.data}")

        except Exception as exc:
            raise Exception(f"Unexpected error during GitHub settings validation: {exc}")

    def validate_checkpoint_json(self, checkpoint_json: str) -> GithubConnectorCheckpoint:
        return GithubConnectorCheckpoint.model_validate_json(checkpoint_json)

    def retrieve_slim_document(
        self,
        start: SecondsSinceUnixEpoch | None = None,
        end: SecondsSinceUnixEpoch | None = None,
        callback: Any = None,
    ) -> GenerateSlimDocumentOutput:
        start_value = 0.0 if start is None else start
        end_value = datetime.now(timezone.utc).timestamp() if end is None else end
        checkpoint = self.build_dummy_checkpoint()

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Confirm the exact org/user login spelling on github.com.
  2. If the org is SSO-protected, authorize the PAT for the org so it becomes visible, then revalidate.
  3. For indexing one known repo, set 'repositories' explicitly to skip owner enumeration entirely.
Defensive patterns

Strategy: validation

Validate before calling

owner_exists = any_visible(gh.get_organization, gh.get_user, owner)
if not owner_exists and not explicit_repositories:
    warn('owner invisible to this token — typo or SSO-hidden org?')

Try / catch

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

Prevention

When it happens

Trigger: repo_owner is a typo/gibberish handle; the org is private and SSO-restricted so it 404s to this token; owner deleted or renamed.

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

Related errors


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