I'm trying to install renovate on a self-hosted GitLab instance. I installed renovate to my Node.js project via the following command: npm install renovate@latest
Then I created a renovate.json
file and inserted the following configuration:
{
"token": "my-gitlab-token",
"platform": "gitlab",
"gitlabHost": "https://my-self-hosted-gitlab.com",
"onboarding": true,
"baseBranches": ["master"],
"automerge": false,
"packageRules": [
{
"packageNames": ["*"],
"automerge": false
}
]
}
Then when I try to run renovate via the following command: npx renovate
I get this error:
FATAL: You must configure a GitHub token
INFO: Renovate is exiting with a non-zero code due to the following logged errors
"loggerErrors": [
{
"name": "renovate",
"level": 60,
"logContext": "QEWpdMHBUx3OqqQYbsThL",
"msg": "You must configure a GitHub token"
}
]
I tried to run npx renovate init
but it get the same error. I also tried to create a .renovaterc.json
file that contains the same configuration. Same error.
I don't understand why renovate does not find my config file. And why renovate thinks I'm using github even though I'm using gitlab.
I run the command in the same path as my config file is located. And when I try to add the flag --config
to my command, renovate returns:
error: unknown option '--config'
According to this documentation: https://github.com/renovatebot/renovate/blob/main/docs/usage/getting-started/running.md#global-config
By default Renovate checks if a file named config.js is present. Any other (*.js, *.json, *.json5, *.yaml or *.yml) file is supported, when you reference it with the
RENOVATE_CONFIG_FILE
environment variable
If the configuration file is not named config.js
and present in the current directory, you need to give the configuration file location via the RENOVATE_CONFIG_FILE
environment variable.
You can then launch renovate like this:
RENOVATE_CONFIG_FILE=renovate.json npx renovate