## CheckRepositoryAccess `runners.check_repository_access(RunnerCheckRepositoryAccessParams**kwargs) -> RunnerCheckRepositoryAccessResponse` **post** `/gitpod.v1.RunnerService/CheckRepositoryAccess` Checks if a principal has read access to a repository. Use this method to: - Validate repository access before workflow execution - Verify executor credentials for automation bindings Returns: - has_access: true if the principal can read the repository - FAILED_PRECONDITION if authentication is required - INVALID_ARGUMENT if the repository URL is invalid ### Examples - Check access: Verifies read access to a repository. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" repositoryUrl: "https://github.com/org/repo" ``` ### Parameters - `repository_url: Optional[str]` repository_url is the URL of the repository to check access for. Can be a clone URL (https://github.com/org/repo.git) or web URL (https://github.com/org/repo). - `runner_id: Optional[str]` ### Returns - `class RunnerCheckRepositoryAccessResponse: …` - `error_message: Optional[str]` error_message provides details when access check fails. Empty when has_access is true. - `has_access: Optional[bool]` has_access indicates whether the principal has read access to the repository. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.runners.check_repository_access( repository_url="https://github.com/org/repo", runner_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.error_message) ``` #### Response ```json { "errorMessage": "errorMessage", "hasAccess": true } ```