Skip to main content

Overview

Default configuration

On installation, Git Proxy 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 Git Proxy configuration, create a proxy.config.json in your current working directory. Git Proxy 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 Git Proxy configuration, use:

git-proxy --config ./config.json

Or with npx:

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

Set ports with ENV variables

By default, Git Proxy 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 and GIT_PROXY_UI_PORT environment variables:

export GIT_PROXY_UI_PORT="5000"
export GIT_PROXY_SERVER_PORT="9090"

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

By default, Git Proxy CLI connects to Git Proxy 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 Git Proxy configuration, run:

git-proxy --validate

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

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