Git credentials

Create a git credential

POST
/v1/orgs/{org}/projects/{project}/git-credentials
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

org*string
project*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

display_name*string
Length1 <= length <= 128
forge*string

Git forge this credential authenticates against

Value in"github" | "gitlab"
name*string

Stable, slug-style handle, unique per scope and immutable after create

Match^[a-z0-9][a-z0-9-]*[a-z0-9]$
Length2 <= length <= 64
repository_ids*array<string>|

IDs of the project repositories this token unlocks

Items1 <= items
scope*string
Value in"project" | "personal"
token*string

The personal access token (write-only)

Length1 <= length

Response Body

application/json

application/problem+json

curl -X POST "https://api-dev.tektona.ai/v1/orgs/string/projects/string/git-credentials" \  -H "Content-Type: application/json" \  -d '{    "display_name": "string",    "forge": "github",    "name": "string",    "repository_ids": [      "string"    ],    "scope": "project",    "token": "string"  }'
{  "$schema": "https://api-dev.tektona.ai/schemas/GitCredentialCreateBody.json",  "credential": {    "created_at": "string",    "display_name": "string",    "forge": "github",    "id": "string",    "name": "string",    "owner_user_id": "string",    "repos": [      {        "name": "string",        "repository_id": "string",        "url": "string"      }    ],    "scope": "project",    "updated_at": "string"  }}