infiniflow/ragflow · error · ConnectorValidationError
Found no repos for organization: {self.repo_owner}. Does the
Error message
Found no repos for organization: {self.repo_owner}. Does the credential have the right scopes? What it means
ConnectorValidationError raised when repositories is unset, repo_owner resolved to an organization (get_organization succeeded), but org.get_repos().totalCount == 0. The credential works yet sees zero repos, so the connector would index nothing. The message explicitly asks whether the credential has the right scopes.
Source
Thrown at common/data_source/github/connector.py:716
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/"
"authorizing-a-personal-access-token-for-use-with-saml-single-sign-on"
)
raise ConnectorValidationError(
f"Your GitHub token is missing authorization to access the `{self.repo_owner}` organization. Please follow the guide to authorize your token: {SSO_GUIDE_LINK}"
)
# If not an org, try as a user
user = self.github_client.get_user(self.repo_owner)
# Check if we can access any repos
total_count = user.get_repos().totalCount
if total_count == 0:View on GitHub (pinned to 554fb1133a)
Solutions
- Use a classic PAT with the 'repo' scope, or a fine-grained PAT with explicit access to that org's repositories (org owner must approve).
- Confirm the token's user is a member of the org with repository read access.
- Verify outside the app: gh api /orgs/<owner>/repos --jq length with the same token.
Defensive patterns
Strategy: validation
Validate before calling
if gh.get_organization(owner).get_repos().totalCount == 0:
warn('token sees zero org repos — check scopes before saving') Try / catch
try:
connector.validate_connector_settings()
except ConnectorValidationError as e:
guide_user_to_scope_fix(str(e)) Prevention
- Issue tokens with the 'repo' scope when private org repos must be indexed.
- Smoke-test the token with 'gh api /orgs/<owner>/repos' before wiring it into the connector.
When it happens
Trigger: repo_owner is a valid org name, the token authenticates, but the token's scopes (e.g. a public-repo-only or wrong-org fine-grained PAT) expose no repositories, returning totalCount 0.
Common situations: Fine-grained PAT limited to 'public repos' of other orgs; classic token without 'repo' scope against a private-repo org; token belongs to a different org membership.
Related errors
- Found no repos for user: {self.repo_owner}. Does the credent
- Your Dropbox token does not have sufficient permissions.
- None of the specified repositories could be accessed: {valid
- Your GitHub token does not have sufficient permissions for t
- Failed to fetch memory list
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/fbb0e7ec48c2be8b.
Report an issue: GitHub.