cli icon indicating copy to clipboard operation
cli copied to clipboard

[QUESTION] <403 forbidden>

Open anchal0997 opened this issue 6 years ago • 36 comments

npm ERR! code E403 npm ERR! 403 403 Forbidden - GET https://registry.npmjs.intuit.com/neo4j-driver npm ERR! 403 In most cases, you or one of your dependencies are requesting npm ERR! 403 a package version that is forbidden by your security policy.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/agarg5/.npm/_logs/2020-02-13T12_29_42_032Z-debug.log

anchal0997 avatar Feb 13 '20 12:02 anchal0997

The same can happen for default registry url sometimes (randomly), for example when installing from docker container using AWS codebuild:

Step 1/6 : FROM node:10-slim
...
Step 4/6 : RUN npm install grunt -g
--
514 | ---> Running in XXXXXXX
515 | npm ERR! code E403
516 | npm ERR! 403 403 Forbidden - GET https://registry.npmjs.org/grunt
517 | npm ERR! 403 In most cases, you or one of your dependencies are requesting
518 | npm ERR! 403 a package version that is forbidden by your security policy.

Somewhat related to #622

imposeren avatar Feb 17 '20 11:02 imposeren

getting the same error on heroku build

Step 16/20 : RUN npm ci && npm run production ---> Running in XXXXXXX npm ERR! code E403 npm ERR! 403 Forbidden: [email protected] npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-02-17T11_17_32_964Z-debug.log

When doing npm install locally i get E429 on random packages

hsmusz avatar Feb 17 '20 11:02 hsmusz

@anchal0997 it seems your registry is set to registry.npmjs.intuit.com, which could be set in the project's package.json(in the registry field) or in your ~/.npmrc. you might need to login to that using npm login (is it a private registry?) or remove the line about it from your ~/.npmrc.

(though right now the official registry is also giving some people 403s)

chee avatar Feb 17 '20 12:02 chee

Duplicate of #836

anton-bot avatar Feb 17 '20 12:02 anton-bot

@anton-bot this is not a duplicate. this user is not using the npm registry. note this line in their initial report:

npm ERR! 403 403 Forbidden - GET https://registry.npmjs.intuit.com/neo4j-driver

(this issue is also older, 4 days ago.)

chee avatar Feb 17 '20 13:02 chee

@chee he referred to the last sentence at https://github.com/npm/cli/issues/805#issuecomment-586957436

DanielRuf avatar Feb 18 '20 06:02 DanielRuf

Generally this issue is not a bug in npm but a problem with the authentication with this intuit registry.

DanielRuf avatar Feb 18 '20 06:02 DanielRuf

I've got exactly same error message. And I tried a lot of things but finally after I had removed specific folder in my project, it could be published. In my case, the folder might be banned for uploading... And still I can't figure out the exact reason.

prozanne avatar Mar 17 '20 07:03 prozanne

In my case, the folder might be banned for uploading

What was the name of it?

DanielRuf avatar Mar 17 '20 08:03 DanielRuf

In my case, the folder might be banned for uploading

What was the name of it?

The folder contains tizen tv web application. config.xml, index.html... etc When I had removed tizen web application, I managed to publish.

prozanne avatar Mar 17 '20 08:03 prozanne

@prozanne I'm unsure if it is ok that you shared the code with us. This might be a different issue and requires some testing on your side (which file may be problematic?).

DanielRuf avatar Mar 17 '20 08:03 DanielRuf

@prozanne I'm unsure if it is ok that you shared the code with us. This might be a different issue and requires some testing on your side (which file may be problematic?).

Oh.... that's ture, I think I shouldn't have uploaded the code. I'd better to remove it. Anyway.... Having dug a lot, finally we've got a clue. If bootstrap.css, socket.io libraries, tizen package file(.wgt) and image resource file(.png) are contained, I couldn't publish at all. But when we removed all of them, it worked.

prozanne avatar Mar 17 '20 23:03 prozanne

Bildschirmfoto 2020-03-18 um 00 52 12

You might want to remove the first version of your comment too.

DanielRuf avatar Mar 17 '20 23:03 DanielRuf

I have the same issue, how can I debug it? I am collecting and packaging only .vue files, no images. Any help is appretiated

avimehenwal avatar Jul 29 '20 00:07 avimehenwal

what's the package name in package.json? @avimehenwal

AmitMirgal avatar Oct 13 '20 15:10 AmitMirgal

Had the same issue. I was trying to publish to a scope which was not in my organization. I had a typo in the scope of my package name in my package.json.

gempain avatar Oct 14 '20 09:10 gempain

I was having this bug too, this (probably) won't work for everyone but my problem was just that I was using an already existing pacakge.

Probably not what'll fix your problem, but it fixed mines.

haaarshsingh avatar Oct 23 '20 02:10 haaarshsingh

same issue

jsdev-mario avatar Nov 02 '20 19:11 jsdev-mario

Hi. The same over here when i try to: npm i @angular/material-moment-adapter

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET http://my.nexus.ip/repository/npm-proxy/@angular%2fmaterial-moment-adapter
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\***\***\AppData\Roaming\npm-cache\_logs\2020-12-09T00_53_23_966Z-debug.log

jlorenzoC avatar Dec 09 '20 01:12 jlorenzoC

Even npm whoami & npm login throw the same 403 error...

TechQuery avatar Dec 15 '20 20:12 TechQuery