Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Deploy
  3. Git providers & deploy keys

Git providers & deploy keys

GitHub, GitLab, Bitbucket, Azure DevOps and more — keys and webhooks set up for you.

Deploy

Cipi reads the repository with a per-app read-only SSH deploy key and deploys on push through a signed webhook. With a provider token, both are created, rotated and removed for you.

Supported providers#

The provider is recognised from the SSH clone URL.

ProviderDeploy keyPush webhook
GitHubAutomaticAutomatic, HMAC-signed
GitLab (cloud or self-hosted)AutomaticAutomatic, secret token
Bitbucket CloudAutomaticAutomatic, HMAC-signed
Azure DevOpsAutomaticAutomatic (service hook)
Cursor OriginAutomaticNone: deploy with cipi deploy or CI
AWS CodeCommitAutomatic (IAM RSA key)None: deploy with cipi deploy or CI
Anything else (Gitea, Forgejo…)ManualManual

No lock-in: any server that accepts SSH deploy keys works.

Save a token#

The installer offers this step; you can also do it any time:

bash
cipi git github-token ghp_xxx
cipi git gitlab-url https://gitlab.example.com   # self-hosted only
cipi git gitlab-token glpat-xxx
cipi git bitbucket-token <token>                 # or email:token
cipi git azure-token <pat>
cipi git origin-token <token>
cipi git codecommit-token <access-key> <secret-key> <iam-user>
cipi git remove-github                           # remove-gitlab, -bitbucket, …
ProviderMinimum permissions
GitHubFine-grained: Administration + Webhooks, read & write. Classic: repo
GitLabapi
BitbucketManage repository access keys and webhooks
Azure DevOpsCode (read & write)
CodeCommitIAM UploadSSHPublicKey (max 5 SSH keys per IAM user)

Tokens are stored encrypted on the server (Vault).

What happens automatically#

EventCipi
cipi app createAdds the deploy key and webhook, then tests that the key can read the branch
cipi app edit --repository=Removes them from the old repository, adds them to the new one, tests again
cipi app deleteRemoves them from the repository
CommandUse
cipi git statusConnected providers and per-app key/webhook IDs
cipi git check [app]Can each key read its repository and branch? Exits 1 if not
cipi git refresh [app]Re-create keys and webhooks (after deletions or a new token)
cipi git refresh --rotate-keysNew deploy keys for every app
cipi git refresh --rotate-secretNew webhook secrets

Manual setup#

Without a token, or for an unsupported server:

bash
cipi deploy myapp --key                          # add as a read-only deploy key
cipi deploy myapp --webhook                      # payload URL and secret
cipi deploy myapp --trust-host=git.example.com:2222   # self-hosted, custom port

With CrowdSec enabled, GitHub and Bitbucket webhook ranges are allowlisted automatically. For other providers, allow a blocked range with cipi crowdsec allow <cidr>.

Private packages: auth.json#

shared/auth.json is linked into every release like .env, so Composer finds credentials for private packages (Packagist.com, Satis, GitHub) on every deploy.

bash
cipi auth create myapp      # creates it (mode 640) and opens the editor
cipi auth edit myapp        # JSON is validated on save
cipi auth show myapp
cipi auth delete myapp

Non-interactive flags (--file=, --json, --force) serve scripts and the panel; REST GET|POST|PUT|DELETE /api/apps/{name}/auth.

Common problems#

ProblemFix
git check failsDeploy key not added, or added to the wrong repository
Self-hosted Git on another portcipi deploy myapp --trust-host=git.example.com:2222
Private Composer packagesAdd credentials with cipi auth (auth.json)

Questions#

QuestionAnswer
Do I need a provider token?No, but with one Cipi adds and rotates deploy keys and webhooks for you.
Can I use HTTPS URLs?Use SSH URLs (git@…): deploy keys are read-only and per app.