---
title: "Create a new Git repository"
method: POST
path: "/gits"
tags: ["Git"]
---

# Create a new Git repository

`POST /gits`

Add a new Git repository to the system

## Request body

- object
  - `name` string, required — Name of the Git repository
  - `url` string, required — URL of the Git repository
  - `auth_type` 'none' | 'http' | 'ssh' — Authentication type for the Git repository
  - `username` string — Username for HTTP authentication
  - `password` string — Password/token for HTTP authentication
  - `ssh_key` string — SSH private key for SSH authentication
  - `ssh_password` string — SSH key password if the key is password-protected

## Response `200`

Git repository created successfully

- Success
  - `code` integer
  - `message` string
  - `data` object

## Changes

- **2025-03-02** `526e5bdf6dee` — 3 breaking, 20 warning, 10 info
  - added the new required request property `name`
  - added the new required request property `url`
  - request body became required
  - removed the request property `data`
  - …29 more

[Change history](https://skmtc.dev/crawlab-team/apis/crawlab-api/changes/gits/post.md)

---

[API](https://skmtc.dev/crawlab-team/apis/crawlab-api.md) · [All operations](https://skmtc.dev/crawlab-team/apis/crawlab-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crawlab-team/crawlab-api/revisions/526e5bdf6dee/schema)
