Public npm package 401 error, why?

Hi,

Made a repository and related npm package public. On npm install there’s a 401 error.

Unable to authenticate, need: Basic realm="GitHub Package Registry"

The npmrc has the organisation.

Why is this happening if the repository and npm package is public?

Github registry requires the user to be authenticated to Github using a private token via npm login with repo and read:package scopes, even for installing public packages.