By default, Fusion uses the standard public API endpoints for GitLab, GitHub,
and Bitbucket to fetch packages. If you want to use your own self-managed,
enterprise, or any other custom versions of these platforms, you can define an
individual API in your
user's config.json file.
Note
Individual APIs are custom configurations that reuse the default implementation classes.
User's Config File
To locate your configuration file, run the config command without arguments:
fusion config
The first line of the output shows the absolute file path, followed by its current content, if any:
/home/<user>/.config/valvoid/fusion/config.json
No config yet.
Note
If the file does not exist yet, create it manually at the shown location.
Once your config.json file is ready, you can define individual APIs for
remote platforms that support such instances. The list below shows the default
platforms from the
Hub schema whose implementation classes can be reused:
\Valvoid\Fusion\Hub\APIs\Remote\GitLab\GitLab::class: GitLab\Valvoid\Fusion\Hub\APIs\Remote\GitHub\GitHub::class: GitHub\Valvoid\Fusion\Hub\APIs\Remote\Bitbucket\Bitbucket::class: Bitbucket
Note
In the example below, we reuse GitLab. Replace the pseudo domain
key individual-gitlab.com and the api
class with your platform's values.
Self-Managed GitLab
For example, you can configure Fusion to use your own GitLab instance alongside the public one:
{
"hub": {
"apis": {
"individual-gitlab.com": {
"api": "Valvoid\\Fusion\\Hub\\APIs\\Remote\\GitLab\\GitLab"
}
}
}
}
This API allows Fusion to fetch dependencies that use the
leading API segment individual-gitlab.com/....