npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

NPM install private repository

The code below works fine with Windows with the command mpm i.

  "dependencies": {
    "my-pack": "git+https://myprivategit.com/my/repo#v0.1.0"
  },

A credential form standard of windows is open, and the login and password is passed.

But on Linux an authetication error is returned.

npm install
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://myprivategit.com/my/repo
npm ERR!
npm ERR! remote: HTTP Basic: Access denied
npm ERR! fatal: Authentication failed for 'https://myprivategit.com/my/repo.git/'
npm ERR!
npm ERR! exited with error code: 128