Skip to main content

prefect_github.credentials

Credential classes used to perform authenticated interactions with GitHub

Classes

GitHubCredentials

Block used to manage GitHub authentication. Attributes:
  • token: the token to authenticate into GitHub.
Examples: Load stored GitHub credentials:
Methods:

format_git_credentials

Format and return the full git URL with GitHub credentials embedded. GitHub uses plain token format without any prefix. Args: Returns:
  • Complete URL with credentials embedded
Raises:
  • ValueError: If token is not configured

get_client

Gets an authenticated GitHub GraphQL HTTPEndpoint client. Returns:
  • An authenticated GitHub GraphQL HTTPEndpoint client.