infiniflow/ragflow · error · ConnectorMissingCredentialError
GitHub credentials not loaded.
Error message
GitHub credentials not loaded.
What it means
validate_connector_settings() starts by checking self.github_client and raises ConnectorMissingCredentialError('GitHub credentials not loaded.') when no authenticated client exists. This is the settings-validation entry point, typically called from the UI/API when a user saves or tests a GitHub credential — the error means the credential object was never used to build a Github client.
Source
Thrown at common/data_source/github/connector.py:671
self,
start: SecondsSinceUnixEpoch,
end: SecondsSinceUnixEpoch,
checkpoint: GithubConnectorCheckpoint,
) -> CheckpointOutput[GithubConnectorCheckpoint]:
return self._load_from_checkpoint(start, end, checkpoint, include_permissions=False)
@override
def load_from_checkpoint_with_perm_sync(
self,
start: SecondsSinceUnixEpoch,
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:View on GitHub (pinned to 554fb1133a)
Solutions
- Provide a valid GitHub access token and ensure load_credentials() runs before validate_connector_settings().
- If using a GitHub App, confirm the app-level credential flow produced the token before validation is triggered.
- Surface this error to the user as 're-enter credential' in the UI rather than retrying validation.
Example fix
// before
connector = GithubConnector(...)
connector.validate_connector_settings() # raises 'GitHub credentials not loaded.'
# after
connector = GithubConnector(...)
connector.load_credentials({'github_access_token': token, 'repo_owner': owner, ...})
connector.validate_connector_settings() Defensive patterns
Strategy: try-catch
Validate before calling
if connector.github_client is None:
return {'valid': False, 'reason': 'missing credential'} Try / catch
try:
connector.validate_connector_settings()
except ConnectorMissingCredentialError:
# prompt user to re-enter the GitHub credential
show_credential_form() Prevention
- Require a non-empty access token at the form/API layer before validation can be triggered.
- Map ConnectorMissingCredentialError to a 're-enter credential' UX state, never a generic 500.
When it happens
Trigger: Calling validate_connector_settings() after constructing GithubConnector but before (or without a successful) load_credentials(), e.g. the token field was blank when the credential was saved.
Common situations: User saves a GitHub app/credential with an empty or missing access token; the credential-builder path raised earlier and validation was still invoked; API request creating the connector without the credential payload.
Related errors
- main() must be defined or exported.
- main() returned a non-JSON-serializable value.
- message.compileNotSupported
- Failed to fetch search detail
- Invalid ${PLATFORM_CONFIG[gitPlatform].name} URL format
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/00cfb6ddb949ae6e.
Report an issue: GitHub.