verdaccio-github-team
v0.1.2
Published
Verdaccio authentication plugin with github team access
Downloads
13
Readme
Verdaccio GitHub Team
This is an authentication plugin for Verdaccio with a Github account. Allowing package access to be managed by using Github Team, Github Team feature is only available to a Github organization.
Configuration
organization
is the name of your Github organization.paginationCount
is the number of results to include in a single API call, the value is optional and will be default to 100. Value ranges from 1 to 100, any value outside the ranges will be default 100.
auth:
github-team:
organization: mycompany
paginationCount: 100
packages:
'@**/*': # scoped packages
access: web-developer
publish: web-lead
unpublish: web-lead
proxy: npmjs
'**':
access: $authenticated
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
Setting Github TOKEN for verdaccio server
Internally, Github TOKEN is required to make API call to Github server. You should start the Verdacccio server with a TOKEN environment variable. E.g: using node to start the server
TOKEN=abcdefg1234 yarn start
Please generate the TOKEN from GitHub Personal Access Tokens page with read:org
checked under admin:org
.
Installing packages
To install a package, first you need to login with a Github credential, please generate the user TOKEN from GitHub Personal Access Tokens page with read:user
under user
.
Go through the steps below to login (replace square bracket section with your value)
npm login --registry=[your npm server registry path]
.- Please enter your github username when prompted, you should be able to search your Github profile via
https://github.com/[username]
. - Copy paste the created user TOKEN with
read:user
access as the password. - Enter your email address.
- After you are logged in successfully, you can start installing via
npm install myPackage --registry=[your npm server registry path]
.
Publishing a packages
Repeat steps 1 to 4 from Installing packages. Then publish with the standard NPM way.
E.g: Go to your package folder to publish (with the package.json
), then run
npm publish myPackage --registry=[your npm server registry path]