Skip to main content

Git

Git connections enable integration with Git repositories for GitOps workflows, configuration management, and playbook automation.

Used By

FieldDescriptionScheme
url*

Git repository URL

string

branch

Branch to clone (defaults to repository default branch)

string

certificate

SSH private key for authentication

EnvVar

connection

Connection name to use for credentials

string

destination

Local directory path for cloning (auto-generated if empty)

string

password

Password or access token for authentication

EnvVar

type

Type of Git service

github | gitlab | azure_devops | git

username

Username for authentication

EnvVar

You must specify connection or url but not both

Authentication Methods

HTTPS with Personal Access Token

https-connection.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Connection
metadata:
name: github-repo
spec:
git:
url: https://github.com/organization/repository.git
username: github-user
password:
valueFrom:
secretKeyRef:
name: git-credentials
key: token
branch: main

SSH with Private Key

ssh-connection.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Connection
metadata:
name: gitlab-repo
spec:
git:
url: git@gitlab.com:organization/repository.git
certificate:
valueFrom:
secretKeyRef:
name: git-ssh-key
key: private-key
branch: main

Supported Git Services

ServiceTypeURL Format
GitHubgithubhttps://github.com/owner/repo.git
GitLabgitlabhttps://gitlab.com/owner/repo.git
Azure DevOpsazure_devopshttps://dev.azure.com/org/project/_git/repo
Bitbucketgithttps://bitbucket.org/owner/repo.git
Generic Gitgithttps://git.example.com/repo.git