---
title: "Hosted Git | Tarka Docs"
description: "Create private Tarka Hosted Git repositories and use SSH, HTTPS, and Git LFS."
url: "https://tarkahq.com/docs/data/hosted-git/"
---

Available Data · Hosted Git

# Hosted Git

Keep private application and agent source in organization-scoped repositories with web access, standard Git transports, and large file support.

Provisioning and management **Use the console or the Control API.**

Create and delete repositories in the Tarka console or through the Control API. Repository state and clone URLs are shared across both management surfaces.

[Open console](https://tarkahq.com/console) [Control API reference](https://tarkahq.com/docs/control-api/data/)

On this page

[Quickstart](https://tarkahq.com/docs/data/hosted-git/#quickstart) [Authentication](https://tarkahq.com/docs/data/hosted-git/#authentication) [Git LFS](https://tarkahq.com/docs/data/hosted-git/#lfs) [API reference](https://tarkahq.com/docs/data/hosted-git/#api-reference) [Deletion](https://tarkahq.com/docs/data/hosted-git/#deletion)

Quickstart

## Create a private repository

Opening Hosted Git in the console prepares your account automatically. For automation, ensure access once, then create repositories inside an organization.

Prepare identity `Control API`

```
curl -X POST \
  "https://tarka.rest/control/v1/me/git-access" \
  -H "Authorization: Bearer $TARKA_ACCOUNT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Create repository `Control API`

```
curl -X POST \
  "https://tarka.rest/control/v1/orgs/$TARKA_ORG_ID/git-repositories" \
  -H "Authorization: Bearer $TARKA_ACCOUNT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "agent-runtime",
    "description": "Private source for the agent runtime",
    "initialize": true,
    "default_branch": "main"
  }'
```

Repository `201 Created`

```
{
  "id": "repository_01K...",
  "org_id": "org_01K...",
  "name": "agent-runtime",
  "status": "ready",
  "web_url": "https://git.tarka.rest/organization/agent-runtime",
  "ssh_clone_url": "ssh://git@git.tarka.rest:2222/organization/agent-runtime.git",
  "https_clone_url": "https://git.tarka.rest/organization/agent-runtime.git",
  "lfs_enabled": true
}
```

Use the clone URL returned by the API instead of constructing one. Organization and account slugs can differ from their display names.

Git clients

## Choose SSH or HTTPS

Sign in to `https://git.tarka.rest` with your Tarka account. Configure a public SSH key for SSH clones, or create a personal access token in Hosted Git for HTTPS Git operations.

**SSH**

Add your public key under account settings, then use the returned `ssh_clone_url`. Port `2222` is part of the URL.

**HTTPS**

Use your Hosted Git username and a personal access token. Do not use your Tarka password as a Git credential.

**Web**

Use `web_url` to browse source, manage keys and tokens, and review repository activity.

Clone over SSH `Git`

```
git clone ssh://git@git.tarka.rest:2222/organization/agent-runtime.git
cd agent-runtime
```

Large files

## Track large artifacts with Git LFS

Repositories support Git LFS. Install the Git LFS client, track file patterns before adding files, and commit the generated `.gitattributes` file.

Track and push `Git LFS`

```
git lfs install
git lfs track "*.safetensors"
git add .gitattributes model.safetensors
git commit -m "Add model artifact"
git push origin main
```

**Git is source control, not a secret store.**

Keep API keys, storage credentials, environment files, and private keys out of Git history. Revoking a secret does not remove it from earlier commits.

Reference

## Control API routes

Prefix each path with `https://tarka.rest/control/v1`. Use a Tarka account access token for Control API requests.

| Method | Path | Operation |
| --- | --- | --- |
| `POST` | `/me/git-access` | Create or reconcile the caller’s Hosted Git identity |
| `POST` | `/orgs/{org_id}/git-repositories` | Create a private repository |
| `GET` | `/orgs/{org_id}/git-repositories` | List organization repositories |
| `DELETE` | `/orgs/{org_id}/git-repositories/{repository_id}` | Delete a repository |

Lifecycle

## Treat repository deletion as permanent

Deleting a repository removes the organization resource and disables its clone URLs. Clone or mirror any source you must retain before confirming deletion.

**Check collaborators and automation first.**

CI jobs, agent workloads, deploy keys, and local clones can continue to reference a deleted URL. Update dependants before removing the repository.
