GitPM Node ·
GitPM-Node is a CLI tool that can enable you to install private git packages from npm without storing username and password in package.json
Disclaimer
☠️ Use this tool only within a docker container
We havent tested it on physical machines
Installation
npm install -g gitpm-node@latest
Usage
- Install all dependencies
gitpm-node install
- Install a new git/npm package
gitpm-node install --save git+https://<DOMAIN>/path/to/package.git
- Normal npm dependencies can also be installed with options
gitpm-node install --save <npm package name>
the above commands will prompt for git credentials and create an
auth.json
in the same directory aspackage.json
containing the git http credentials
In case if auth.json exists, it will be used without any prompt (Usefull incase of CI/CD)
- Example
auth.json
{
"git.domain.com": {
"username": "<username / token name>",
"password": "<password / personal token>"
}
}