infiniflow/ragflow · error · ConnectorMissingCredentialError
GitHub
Error message
GitHub
What it means
The GitHub connector's core fetch generator _fetch_from_github raises ConnectorMissingCredentialError('GitHub') when self.github_client is None. Every checkpointed run funnels through this method, so the error means the run began without a constructed Github() client — i.e. load_credentials() did not run or did not reach github.Github(...). It fires before the checkpoint deep-copy and any API call.
Source
Thrown at common/data_source/github/connector.py:445
except RateLimitExceededException:
sleep_after_rate_limit_exception(github_client)
return self.get_all_repos(github_client, attempt_num + 1)
def _pull_requests_func(self, repo: Repository.Repository) -> Callable[[], PaginatedList[PullRequest]]:
return lambda: repo.get_pulls(state=self.state_filter, sort="updated", direction="desc")
def _issues_func(self, repo: Repository.Repository) -> Callable[[], PaginatedList[Issue]]:
return lambda: repo.get_issues(state=self.state_filter, sort="updated", direction="desc")
def _fetch_from_github(
self,
checkpoint: GithubConnectorCheckpoint,
start: datetime | None = None,
end: datetime | None = None,
include_permissions: bool = False,
) -> Generator[Document | ConnectorFailure, None, GithubConnectorCheckpoint]:
if self.github_client is None:
raise ConnectorMissingCredentialError("GitHub")
checkpoint = copy.deepcopy(checkpoint)
# First run of the connector, fetch all repos and store in checkpoint
if checkpoint.cached_repo_ids is None:
repos = []
if self.repositories:
if "," in self.repositories:
# Multiple repositories specified
repos = self.get_github_repos(self.github_client)
else:
# Single repository (backward compatibility)
repos = [self.get_github_repo(self.github_client)]
else:
# All repositories
repos = self.get_all_repos(self.github_client)
if not repos:
checkpoint.has_more = FalseView on GitHub (pinned to 554fb1133a)
Solutions
- Call connector.load_credentials({... 'github_access_token': ...}) before load_from_checkpoint*.
- Verify the credential document actually contains a non-empty github_access_token; log its presence (not value) at startup.
- Wire validate_connector_settings() into run startup so missing credentials fail fast with a clear message instead of mid-generator.
Example fix
// before
connector = GithubConnector(...)
for doc in connector.load_from_checkpoint(start, end, checkpoint):
... # raises ConnectorMissingCredentialError('GitHub')
# after
connector = GithubConnector(...)
connector.load_credentials({'github_access_token': token, ...})
for doc in connector.load_from_checkpoint(start, end, checkpoint):
... Defensive patterns
Strategy: validation
Validate before calling
if connector.github_client is None:
raise RuntimeError('GitHub credentials not loaded before checkpoint run') Type guard
def has_github_client(c: GithubConnector) -> bool:
return c.github_client is not None Try / catch
try:
for doc in connector.load_from_checkpoint(start, end, cp):
...
except ConnectorMissingCredentialError:
# credential bootstrap failed; do not retry the run as-is
reload_credentials_and_restart(connector) Prevention
- Call load_credentials before every load_from_checkpoint run.
- Log credential presence (not value) at worker startup to catch missing tokens early.
When it happens
Trigger: Invoking load_from_checkpoint / load_from_checkpoint_with_perm_sync (both call _fetch_from_github) on a connector whose load_credentials was never called, so github_client stayed None.
Common situations: Indexing worker building the connector but the credential payload lacked the GitHub access token; misconfigured credential store; running the connector in a script/test without the credential bootstrap step.
Related errors
- main() must be defined or exported.
- Invalid chat_id: ${payload.chat_id}
- main() must be defined or exported.
- Failed to read compilation status
- Azure Blob: container_name is required together with account
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/4040dbf302d3b31d.
Report an issue: GitHub.