prefect_gitlab.credentials
Module used to enable authenticated interactions with GitLab
Classes
GitLabCredentials
Store a GitLab personal access token to interact with private GitLab
repositories.
Attributes:
token: The personal access token to authenticate with GitLab.url: URL to self-hosted GitLab instances.
format_git_credentials
- Personal access tokens: prefixed with “oauth2:”
- Deploy tokens (username:token format): used as-is
- Already prefixed tokens: not double-prefixed
url: Repository URL (e.g., “https://gitlab.com/org/repo.git”)
- Complete URL with credentials embedded
ValueError: If token is not configured
get_client
- An authenticated GitLab client.