Add a Git token to Velocity
Git tokens, which are often stored in the developer's local environment, then need to be included as a build argument by referencing the relevant variable. For example, the following Dockerfile demonstrates the required GH_TOKEN
and GH_USERNAME
build arguments that are included:
Build arguments values for Velocity can be input as the value itself or as an environment variable and then resolved at runtime (e.g $MY_GH_TOKEN
)
Your Git token is never passed to Velocity, as it remains only in your local machine, and in your Kubernetes cluster during a Velocity build.
To do this, pass the GH_TOKEN
and GH_USERNAME
similar to the following:
See Add or override environment variablesfor more information.
Last updated