after publishing an NPM package from a repository in gitlab im unable to install it due to host unknown error.
i have in my gitlab 2 different repositories. Repo A and Repo B.
Repo A has a branch that holds common code to be used by Repo B and later by other repos as well.
Repo A is publishing the artifacts of the build using gitlab ci.
now in Repo B i try to get the package.
I’ve added to my npmrc the following configurations:
//https://compDomain/api/v4/projects/123/packages/npm/:_authToken=mytoken
@common-comp:registry=https://compDomain/api/v4/projects/123/packages/npm/
registry=https://registry.npmjs.org
http-proxy=http://companyProxy:8080
https-proxy=http://companyProxy:8080
package-lock=false
strict-ssl=false
when i run npm install i get this error:
504 Unknown Host - GET https://compDomain/api/v4/projects/123/packages/npm/common-comp
when i access the private registry via web its accessible. i also did nlslookup, pings and they all work. only when running via NPM its failing.
i also cleared the npm cache and tried with and without the http-proxy.
i also tried running
npm config set -- //https://compDomain/api/v4/projects/123/packages/npm/:_authToken=mytoken
which didnt help as well