My company hosts most of the private repositories in gitlab, thanks to its generous unlimited-free-plan, and wonderful built-in CI.
npm need to get package from private gitlab, or bitbucket: create tag, and provide direct link when install package.
First: tag package with version (e.g. 0.0.1)
git tag -a v0.0.1 -m "first release" git push origin v0.0.1
, then tell npm the link with tag. I will love to use git+ssh instead of git+https since my CI runner and collaborators already have the right to get access to this repo; thus don’t need to enter password every time npm try to install.
npm install git+ssh://firstname.lastname@example.org:company/repo.git#v0.0.1 --save