npm install sporadically sending username

Hi there

We use a private nexus repository, and have been for some time without any issues.

We send our npm installs from jenkins jobs during the build stage like this

npm install --registry http://USERNAME:PASSWORD@xx.xxx.3.5:8081/repository/npm-all-group/

All of a sudden it’s fallen over, with the errors from the request log on the server looking like this

xx.xxx.1.4 - testuser [13/Mar/2019:14:35:13 +0000] “GET /repository/npm-all-group/array-equal HTTP/1.1” 200 - 2122 3 “npm/5.6.0 node/v8.9.4 darwin x64”
xx.xxx.1.4 - - [13/Mar/2019:14:35:13 +0000] “GET /repository/npm-all-group/abbrev/-/abbrev-1.1.1.tgz HTTP/1.1” 401 - 0 1 “npm/5.6.0 node/v8.9.4 darwin x64”
xx.xxx.1.4 - - [13/Mar/2019:14:35:14 +0000] “GET /repository/npm-all-group/array-uniq/-/array-uniq-1.0.3.tgz HTTP/1.1” 401 - 0 2 “npm/5.6.0 node/v8.9.4 darwin x64”
xx.xxx.1.4 - - [13/Mar/2019:14:35:14 +0000] “GET /repository/npm-all-group/has-flag/-/has-flag-3.0.0.tgz HTTP/1.1” 401 - 0 1 “npm/5.6.0 node/v8.9.4 darwin x64”
xx.xxx.1.4 - testuser [13/Mar/2019:14:35:14 +0000] “GET /repository/npm-all-group/acorn HTTP/1.1” 200 - 240271 923 “npm/5.6.0 node/v8.9.4 darwin x64”

Notice how the username is not sent every time, and when it isn’t, I obviously get a 401 returned and the install fails.

Has anyone got any ideas what could be the cause of this or how to proceed?

Any ideas or tips, greatly welcomed.

There have been quite a few changes in npm relating to registry requests since 5.6.0, can you try with a more recent version?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.