全部指南

Private Git (SSH deploy keys)

Deploy private GitLab, Bitbucket or GitHub repositories with a deploy key.

  1. 1Get a deploy key

    Add service → Git repository with a git@ URL shows a deploy key.

    bash
    oc deploy-key create
  2. 2Register it

    GitHub: Settings → Deploy keys · GitLab: Settings → Repository → Deploy keys · Bitbucket: Repository settings → Access keys. No write access needed; create a new key per repository.

  3. 3Create the service

    bash
    oc service create --repo git@gitlab.com:acme/api.git --branch main --deploy-key <ID> --wait

相關指南