0

I am trying to integrate Renovate into my GitLab self-hosted environment, and I have a project that connects to some monorepo dependencies hosted on a private GitLab registry. I am trying to run Renovate on these dependencies, but I keep receiving the following error:

DEBUG: Failed to look up npm package mydependency (repository=myrepo, packageFile=src/client/package.json, dependency=mydependency)

I have confirmed that the credentials provided in the renovate.json file are correct and have the necessary permissions to access the private registry. However, Renovate is still unable to find the specified dependencies.

Has anyone else encountered this issue or have any suggestions on how to resolve it? Any help would be greatly appreciated. These are my configurations:

image: renovate/renovate:35.62

stages:
  - build

variables:
  RENOVATE_BASE_DIR: $CI_PROJECT_DIR/renovate
  RENOVATE_GIT_AUTHOR: Renovate Bot <dev+renovate-bot@mycompany.io>
  RENOVATE_OPTIMIZE_FOR_DISABLED: "true"
  RENOVATE_REPOSITORY_CACHE: "true"
  LOG_LEVEL: debug

cache:
  key: ${CI_COMMIT_REF_SLUG}-renovate
  paths:
    - $CI_PROJECT_DIR/renovate

print:
  stage: build
  script:
    - echo "Renovate the repositories..."

run_renovate:
  stage: build
  resource_group: production
  # only:
  #   - schedules
  script:
    - renovate $RENOVATE_EXTRA_FLAGS
module.exports = {
    endpoint: 'https://git.mycompany.io/api/v4/',
    platform: 'gitlab',
    persistRepoData: true,
    logFileLevel: 'error',
    onboardingConfig: {
        extends: ['renovate/renovate-config'],
    },
    repositories: [
        "mycompany-tech/myrepo"
    ],
    autodiscover: true,
};

and the json:

{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "packageRules": [
        {
            "matchPackagePatterns": ["*"],
            "enabled": false
        },
        {
            "matchPackagePatterns": ["^@monorepo/dep*"],
            "groupName": "my monorepodep",
            "pinVersions": false,
            "enabled": true
        }
    ],
    "hostRules": [
        {
            "hostType": "gitlab",
            "matchHost": "git.mycompany.io",
            "token": "xxx"
        }
    ],
    "extends": [
        "config:base",
        ":preserveSemverRanges",
        ":dependencyDashboard",
        ":rebaseStalePrs",
        ":enableVulnerabilityAlertsWithLabel('security')",
        "group:recommended"
    ]
}

Thank you.

1 Answers1

0

check debug logs, is renovate calling your dependency with the right host url?