---
title: "Get Git configuration"
method: GET
path: "/v1/models/{modelId}/git"
tags: ["Model Git configuration"]
---

# Get Git configuration

`GET /v1/models/{modelId}/git`

Retrieve the Git configuration for a shared model.

## Path parameters

- `modelId` string, uuid, required

## Query parameters

- `include` 'webhookSecret'

## Response `200`

Git configuration retrieved successfully

- ModelGitConfig
  - `authMethod` 'ssh' | 'https_token' — Authentication method. `ssh` for deploy key, `https_token` for deploy token/PAT.
  - `cloneUrl` string — Clone URL of the git repository (SSH or HTTPS)
  - `baseBranch` string — The target branch for Omni pull requests.
  - `branchPerPullRequest` boolean — If `true`, all pull requests will create a branch in Omni, even those created outside of the tool.
  - `gitFollower` boolean — If `true`, the shared model is read-only and can only be updated by merging pull requests to the base branch.
  - `gitServiceProvider` 'github' | 'gitlab' | 'azure_devops' | 'bitbucket' — The git provider type. - `github` - GitHub - `gitlab` - GitLab - `azure_devops` - Azure DevOps - `bitbucket` - Bitbucket
  - `modelPath` string, nullable — Path to model files in the repository.
  - `publicKey` union — SSH public key for repository access (deploy key). Null for HTTPS token auth (`authMethod: https_token`).
    - string
    - unknown
  - `requirePullRequest` 'always' | 'users-only' | 'never' — Controls when pull requests are required for changes: - `always` - Required for all changes - `users-only` - Required only for user-initiated changes - `never` - Never required
  - `sshUrl` string — **Deprecated. Use `cloneUrl` instead**. SSH URL of the git repository.
  - `webUrl` string, nullable — Custom web URL for the git repository, or null if not set.
  - `webhookSecret` string — Webhook secret for signature verification. Only included if requested via `?include=webhookSecret`.
  - `webhookUrl` string — Webhook URL to configure in your git provider.

## Other responses

- `400` — Bad Request Possible error messages: - `Bad Request: modelId: Invalid uuid`
- `401` — Missing or invalid authentication
- `403` — Forbidden Possible error messages: - `Forbidden: Requires MANAGE_MODEL permission`
- `404` — Not Found Possible error messages: - `Not Found: Model does not exist` - `Not Found: Git configuration not found for this model`
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/versions/6b02f7349d0e/schema)
