infiniflow/ragflow · error · CredentialExpiredError
Invalid or expired GitLab credentials.
Error message
Invalid or expired GitLab credentials.
What it means
Error "Invalid or expired GitLab credentials." thrown in infiniflow/ragflow.
Source
Thrown at common/data_source/gitlab_connector.py:195
self.gitlab_client: gitlab.Gitlab | None = None
def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None:
self.gitlab_client = gitlab.Gitlab(credentials["gitlab_url"], private_token=credentials["gitlab_access_token"])
return None
def validate_connector_settings(self) -> None:
if self.gitlab_client is None:
raise ConnectorMissingCredentialError("GitLab")
try:
self.gitlab_client.auth()
self.gitlab_client.projects.get(
f"{self.project_owner}/{self.project_name}",
lazy=True,
)
except gitlab.exceptions.GitlabAuthenticationError as e:
raise CredentialExpiredError("Invalid or expired GitLab credentials.") from e
except gitlab.exceptions.GitlabAuthorizationError as e:
raise InsufficientPermissionsError("Insufficient permissions to access GitLab resources.") from e
except gitlab.exceptions.GitlabGetError as e:
raise ConnectorValidationError("GitLab project not found or not accessible.") from e
except Exception as e:
raise UnexpectedValidationError(f"Unexpected error while validating GitLab settings: {e}") from e
def _fetch_from_gitlab(self, start: datetime | None = None, end: datetime | None = None) -> GenerateDocumentsOutput:
if self.gitlab_client is None:
raise ConnectorMissingCredentialError("Gitlab")
project: Project = self.gitlab_client.projects.get(f"{self.project_owner}/{self.project_name}")
start_utc = start.astimezone(timezone.utc) if start else None
end_utc = end.astimezone(timezone.utc) if end else None
View on GitHub (pinned to 554fb1133a)
Solutions
- Regenerate the GitLab access token and update the connector credentials.
- Verify the token has not expired and has api/read_api scope.
Example fix
# GitLab: Settings > Access Tokens > create token with read_api scope
When it happens
Trigger: Thrown at common/data_source/gitlab_connector.py:195 when the library encounters an invalid state.
Common situations: The GitLab personal access token is expired or revoked; refreshing the credential prevents this error.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/7fe6653d8cb79bb3.
Report an issue: GitHub.