Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

403 Forbidden error while installing github packages. which were created with CI/CD pipeline using GITHUB Actions

I had created my react application as a package using github CI/CD pipeline(using github actions). Everything is going fine. But when I trying to install that created package, I'm facing a issue i.e.,

npm ERR! 403 403 Forbidden - GET https://npm.pkg.github.com/@ltts-dtp-appstudio%2fform - Permission permission_denied: The token provided does not match expected scopes.

I had created a github PAT fine grained token with all the permissions required. But even then facing the same above error.

403 forbidden error

I'm trying to install the package create in github through CI/CD pipeline(using GITHUB actions).

I was expecting that package to be installed and should be added in dependencies but getting an 403 forbidden which says permission denied

Can anyone suggest me how to solve this error?

like image 438
Pranathi Avatar asked Oct 28 '25 03:10

Pranathi


1 Answers

In the application which I wanted to install the package, create a .npmrc file in root path and added this part into the file

@username:registry = https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken={{token}}

Here at username replace with your username and at token - first create a classic token with read:packages enabled and replace that token with the created one.

like image 128
Pranathi Avatar answered Oct 31 '25 11:10

Pranathi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!