---
title: "CheckRepositoryAccess"
method: POST
path: "/gitpod.v1.RunnerService/CheckRepositoryAccess"
tags: ["gitpod.v1.RunnerService"]
---

# CheckRepositoryAccess

`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"
   ```

## Request body

- GitpodV1CheckRepositoryAccessRequest
  - `repositoryUrl` string, uri — 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).
  - `runnerId` string, uuid

## Response `200`

Success

- GitpodV1CheckRepositoryAccessResponse
  - `errorMessage` string — error_message provides details when access check fails. Empty when has_access is true.
  - `hasAccess` boolean — has_access indicates whether the principal has read access to the repository.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
