infiniflow/ragflow · error · ConnectorValidationError
Found no repos for user: {self.repo_owner}. Does the credent
Error message
Found no repos for user: {self.repo_owner}. Does the credential have the right scopes? What it means
ConnectorValidationError raised on the fallback path: repo_owner is not an accessible organization, so the connector tries get_user(repo_owner); if user.get_repos().totalCount == 0 it refuses to index nothing. Like the org variant, it points at token scopes — the owner exists as a user but the credential can see none of their repos.
Source
Thrown at common/data_source/github/connector.py:735
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:
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:View on GitHub (pinned to 554fb1133a)
Solutions
- Re-issue the token with the 'repo' scope (classic) or grant the fine-grained PAT access to those repositories.
- Or explicitly set 'repositories' to named repos instead of relying on whole-owner enumeration.
- Confirm the owner string is the intended account (not a same-named org).
Defensive patterns
Strategy: try-catch
Validate before calling
user = gh.get_user(owner)
if user.get_repos().totalCount == 0 and not explicit_repositories:
warn('zero visible repos for this owner — check token scopes') Try / catch
try:
connector.validate_connector_settings()
except ConnectorValidationError as e:
return 400, str(e) Prevention
- Set explicit 'repositories' when indexing a private-repo-only account rather than whole-owner sync.
- Grant the PAT 'repo' scope before enabling user-wide indexing.
When it happens
Trigger: repo_owner is a personal account, the token authenticates, but every repo that account owns is private (or the token lacks access), so the public/visible repo count is zero.
Common situations: Indexing your own account with all-private repos using a PAT without 'repo' scope; owner name that is actually an empty org but resolves as a user; fork-only accounts with hidden visibility.
Related errors
- Found no repos for organization: {self.repo_owner}. Does the
- 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/209654f4852b8dd2.
Report an issue: GitHub.