I'm attempting to configure Renovate to check for updates in a custom Maven repository that requires authentication. However, when I run Renovate, I encounter the following error:

Each packageRule must contain at least one match* or exclude* selector

Here's a snippet of my Renovate configuration file:

{
    "packageRules": [
        {
            "hostRules": [
                {
                    "matchHost": "<HOST>",
                    "username": "<USERNAME>",
                    "password": "<PASSWORD>"
                }
            ]
        }
    ]
}

My understanding is that the "match*" or "exclude*" selectors are essential for Renovate to determine which packages it should manage. I don't want to use these selectors because my intention is only to enable Renovate to access this specific custom repository. I don't need it to manage or update specific packages within it.

  1. How can I configure Renovate to authenticate to a custom Maven repository without using the "match*" or "exclude*" package rules?
  2. Is there an alternative way to grant Renovate access to a private repository for dependency checks?
1

There are 1 best solutions below

0
Gaël J On

You can use matchDatasources for instance:

{
  "packageRules": [
    {
      "matchDatasources": ["maven"],
      "registryUrls": [
        "https://artifactory.mycompany.net/artifactory/maven-repo"
      ],
      "hostRules": ...
    }
  ]
}