https://github.com/paketo-buildpacks/git
Paketo Buildpack for Git
https://github.com/paketo-buildpacks/git
cnb git
Last synced: 10 months ago
JSON representation
Paketo Buildpack for Git
- Host: GitHub
- URL: https://github.com/paketo-buildpacks/git
- Owner: paketo-buildpacks
- License: apache-2.0
- Created: 2021-04-06T00:11:55.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-08-16T13:36:00.000Z (11 months ago)
- Last Synced: 2025-08-16T15:28:00.005Z (11 months ago)
- Topics: cnb, git
- Language: Go
- Homepage:
- Size: 953 KB
- Stars: 1
- Watchers: 4
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Paketo Buildpack for Git
The Paketo Buildpack for Git is a Cloud Native Buildpack that retrieves `git` metadata and performs `git` operations.
## Behavior
This buildpack uses the `git` dependency off of the stack that it is running on top of. The Git buildpack will only participate if there is a valid `.git` directory in the application source directory or if there a `git-credentials` service bindings present.
The buildpack will do the following:
- Sets the `REVISION` environment variable, which is the commitish of HEAD, to be available for the build processes of other buildpacks and in the final running image.
- Sets the `org.opencontainers.image.revision` label with the same commitish as the `REVISION` environment variable.
- Creates custom `git` credential managers if it is provided with credentials through a binding.
## Bindings
The buildpack optionally accepts the following bindings:
### Type: `git-credentials`
|Key | Value | Description
|----------------------|---------|------------
|`credentials` | `` | The credentials file should have the following format to conform with the [`git` credential structure](https://git-scm.com/docs/git-credential#IOFMT).
|`context` (optional) | `` |The context is an [optional pattern](https://git-scm.com/docs/gitcredentials#_credential_contexts) as defined by `git`. If a context is not provided then the credentials given in the binding will be the default credentials that `git` uses when authenticating. A given context can only be used once for any group of bindings, if a context is given by two separate bindings the build will fail.