admin管理员组

文章数量:1292150

I'm trying to publish a folder of my monorepo on the gitlab package registry. I've tried everything, but without any success.

I'm always getting:

npm ERR! need auth This command requires you to be logged in to /
npm ERR! need auth You need to authorize this machine using `npm adduser`

I configured my .npmrc as suggested:

@pinko:registry=/
//gitlab/api/v4/packages/npm/:_authToken=${GITLAB_AUTH_TOKEN}
//gitlab/api/v4/projects/123456/packages/npm/:_authToken=${GITLAB_AUTH_TOKEN}

Then I execute in the terminal:

GITLAB_AUTH_TOKEN=gdt-123456 npm publish

I tried both with deploy and personal tokens, but nothing, allowed them all the possible permission I could when creating as well. Also tried to set

npm config set -- '/gitlab/api/v4/projects/123456/packages/npm/:_authToken' "gdt-123456"

What am I missing?

本文标签: npmGitlab private registry issue with npmrcStack Overflow