Gitlab personal access token doesn't seem to be used, how to verify it works?

280 Views Asked by At

I have my gitlab access token set up in my project's .npmrc file but I keep getting a 401 error.

Apparently this probably means my token isn't valid, but when I check when the personal access token was last used (on the Gitlab site) it says "never"...

So I'm wondering why the token is not being used if it's configured in the project's .npmrc file and also configure globally on my system.

I was wondering if there was a way to validate if it even functions in the first place as well.

1

There are 1 best solutions below

1
Aloysius Blue Whale On

Turned out to be a token permissions isssue: my personal access token only had read-api permissions (which I thought was enough), and once I created a new token with full permissions on Gitlab it worked. It may only need read+write api permissions though.

May go back and test that and will update if so.