- Generate personal token with
read:packagespermission - Login to GitHub Packages registry
npm login --scope=@YourOrg --registry=https://npm.pkg.github.com
- Enter your GitHub username in lower case as
Usernameand personal token asPassword. - Now you can simply install any private package from the
@YourOrgscope like:
yarn add @YourOrg/private-package
# or
npm i @YourOrg/private-package
- Navigate to package settings at
https://github.com/orgs/YourOrg/packages/npm/private-package/settingsand add dependent repository toActions access - Create or update
.npmrcfile with registry for private packages scope@YourOrg:registry=https://npm.pkg.github.com - Set workflow token permission for
packagestoreadorwrite(inheritsread) or assignread-all/write-allto all permissions