npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Installing from tarball regression (npm >= 6.10.3)

What I Wanted to Do

Install a package from a GitLab tarball URL.

npm i

What Happened Instead

An error occurs.

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

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-09-09T09_12_38_914Z-debug.log

Reproduction Steps

See above. To reproduce the issue just run

npm i

with npm >= 6.10.3


The regression was introduced in npm 6.10.3 and seems the most likely culprit but I did not dig on it so I can not confirm the issue was actually introduced in that commit.

Platform Info

$ npm --versions

  npm: '6.10.3',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '4',
  nghttp2: '1.39.2',
  node: '12.10.0',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.31.0',
  v8: '7.6.303.29-node.16',
  zlib: '1.2.11'

$ node -p process.platform

It seems the regression was introduced in as the pathmatch regex matches the above URL pathname.

Hey @lpinca we’ve created an issue on the repo and triaged it. Working on the fix now!