Skip to main content

Overview

Default configuration

On installation, GitProxy ships with an out-of-the-box configuration. This is fine for demonstration purposes but is likely not what you want to deploy into your environment.

Customise configuration

To customise your GitProxy configuration, create a proxy.config.json in your current working directory. GitProxy will load this file and set the values you have specified. Any missing sections will use the default configuration values.

Here is a minimal example:

{
"authorisedList": [
{
"project": "octocat",
"repo": "Hello-World",
"url": "https://github.com/octocat/Hello-World"
}
]
}

The full configuration reference can be found at the Reference page.

Alter the configuration path

To specify a different file name for your GitProxy configuration, use:

git-proxy --config ./config.json

Or with npx:

npx -- @finos/git-proxy --config ./config.json

Set ports with ENV variables

By default, GitProxy uses port 8000 to expose the Git Server and 8080 for the frontend application. The ports can be changed by setting the GIT_PROXY_SERVER_PORT, GIT_PROXY_HTTPS_SERVER_PORT (optional) and GIT_PROXY_UI_PORT environment variables:

export GIT_PROXY_UI_PORT="5000"
export GIT_PROXY_SERVER_PORT="9090"
export GIT_PROXY_HTTPS_SERVER_PORT="9443"

Note that GIT_PROXY_UI_PORT is needed for both server and UI Node processes, whereas GIT_PROXY_SERVER_PORT (and GIT_PROXY_HTTPS_SERVER_PORT) is only needed by the server process.

By default, GitProxy CLI connects to GitProxy running on localhost and default port. This can be changed by setting the GIT_PROXY_UI_HOST and GIT_PROXY_UI_PORT environment variables:

export GIT_PROXY_UI_HOST="http://www.git-proxy.com"
export GIT_PROXY_UI_PORT="5000"

Validate configuration

To validate your GitProxy configuration, run:

git-proxy --validate

To validate your configuration at a custom file location, run:

git-proxy --validate --config ./config.json