Installing from tarball regression (npm >= 6.10.3)

What I Wanted to Do

Install a package from a GitLab tarball URL.

npm i https://gitlab.com/iTudou2016/ws/-/archive/3.3.2/ws-3.3.2.tar.gz

What Happened Instead

An error occurs.

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://gitlab.com/iTudou2016/ws/-/archive/3.3.2/ws-3.3.2.tar.gz.git
npm ERR! 
npm ERR! remote: HTTP Basic: Access denied
npm ERR! fatal: Authentication failed for 'https://gitlab.com/iTudou2016/ws/-/archive/3.3.2/ws-3.3.2.tar.gz.git/'
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 https://gitlab.com/iTudou2016/ws/-/archive/3.3.2/ws-3.3.2.tar.gz

with npm >= 6.10.3

Details

The regression was introduced in npm 6.10.3 and https://github.com/npm/cli/commit/4050b91898c60e9b22998cf82b70b9b822de592a 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
linux