NPM
Node Package Manager
Config
CLI
Using package
Registry
Github
Public
npm i https://github.com/user_name/node_project_name
"package-name": "https://github.com/<user>/<repo>.git"
Private
Https and oauth
You will need to have or create an access token with permissions to access the repository. see: [Github - Managing deploy keys][link text itself]
"package-name": "git+https://<github_token>:x-oauth-basic@github.com/<user>/<repo>.git"
Ssh
You will need to create an ssh key. see:
npm install git+ssh://git@github.com:user_name/node_project.git
"package-name": "git+ssh://git@github.com:<user>/<repo>.git"
References
- npm Docs
- Managing deploy keys
- Connecting to github with ssh
- Creating a token Using a token on the command line Further reading Creating a personal access token