Failed to install dependency from GitLab repo

My site is https://shoebox-battle.netlify.app

In my latest update, I added a dependency that’s meant to be installed from a public GitLab repository. It’s specified in package.json as such:

  "dependencies": {
    "goto10": "https://gitlab.com/safranka.mate/goto10-commons.git",
  },

However, the dployment fails at the build stage. From the logs it appears that Netlify is trying to connect via SSH despite the explicit HTTPS link in package.json:

7:03:28 PM: Installing npm packages using npm version 10.8.2
7:03:30 PM: npm error code 128
7:03:30 PM: npm error An unknown git error occurred
7:03:30 PM: npm error command git --no-replace-objects ls-remote ssh://git@gitlab.com/safranka.mate/goto10-commons.git
7:03:30 PM: npm error Warning: Permanently added 'gitlab.com,172.65.251.78' (ECDSA) to the list of known hosts.
7:03:30 PM: npm error git@gitlab.com: Permission denied (publickey).
7:03:30 PM: npm error fatal: Could not read from remote repository.
7:03:30 PM: npm error
7:03:30 PM: npm error Please make sure you have the correct access rights
7:03:30 PM: npm error and the repository exists.
7:03:30 PM: npm error A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-12-28T18_03_28_559Z-debug-0.log
7:03:30 PM: Error during npm install
7:03:30 PM: Failing build: Failed to install dependencies
7:03:30 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1

I am able to install the package on my own computer without any problems. I need to know how to either:

  1. Make Netlify connect via HTTPS
  2. Upload an SSH key so that Netlify can connect to my repo

Thanks

UPDATE: I have published the package goto10 on NPM and updated the package.json:

  "dependencies": {
    "goto10": "^1.0.0",
  },

However, the build still fails, and the log still says it’s trying to install from gitlab via SSH:

5:38:53 PM: Installing npm packages using npm version 10.8.2
5:38:56 PM: npm error code 128
5:38:56 PM: npm error An unknown git error occurred
5:38:56 PM: npm error command git --no-replace-objects ls-remote ssh://git@gitlab.com/safranka.mate/goto10-commons.git
5:38:56 PM: npm error Warning: Permanently added 'gitlab.com,172.65.251.78' (ECDSA) to the list of known hosts.
5:38:56 PM: npm error git@gitlab.com: Permission denied (publickey).
5:38:56 PM: npm error fatal: Could not read from remote repository.
5:38:56 PM: npm error
5:38:56 PM: npm error Please make sure you have the correct access rights
5:38:56 PM: npm error and the repository exists.
5:38:56 PM: npm error A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-12-29T16_38_53_840Z-debug-0.log

PLEASE look into this. I’m starting to suspect a caching issue. I have tried “Clear cache and Retry”, same result.

I’m not seeing any failed builds connected to this site, are you still having issues? If so, could you link us to the specific build you’re having issues with?

No, I worked it out by myself.

Got it, thanks for letting us know!