keboola / git-service-api-client
Keboola Git Service API client
Package info
github.com/keboola/git-service-php-api-client
pkg:composer/keboola/git-service-api-client
3.0.0
2026-05-27 06:10 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.5
- psr/http-message: ^1.0|^2.0
- psr/log: ^1.0|^2.0|^3.0
- webmozart/assert: ^1.11
Requires (Dev)
- keboola/coding-standard: ^15.0
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^9.6
- sempro/phpunit-pretty-print: ^1.4
This package is auto-updated.
Last update: 2026-06-02 09:58:39 UTC
README
Installation
composer require keboola/git-service-api-client
Usage
use Keboola\GitServiceApiClient\ApiClientConfiguration; use Keboola\GitServiceApiClient\Auth\KeboolaServiceAccountAuth; use Keboola\GitServiceApiClient\Auth\ManageApiTokenAuth; use Keboola\GitServiceApiClient\GitServiceApiClient; // Default: projected Kubernetes ServiceAccount token from // /var/run/secrets/connection.keboola.com/serviceaccount/token, re-read on // every request so kubelet-rotated tokens are picked up automatically. $client = new GitServiceApiClient('https://git-service.example.com'); // Manage API token (legacy) $client = new GitServiceApiClient( 'https://git-service.example.com', new ApiClientConfiguration(auth: new ManageApiTokenAuth($manageApiToken)), ); // SA token from a non-default mount path $client = new GitServiceApiClient( 'https://git-service.example.com', new ApiClientConfiguration( auth: new KeboolaServiceAccountAuth('/var/run/secrets/tokens/connection-token'), ), );
KeboolaServiceAccountAuth sends the bearer token in
X-Kubernetes-Authorization; ManageApiTokenAuth sends the legacy
X-KBC-ManageApiToken header.
License
MIT licensed, see LICENSE file.