Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-20170

401 error on npm actions in newer npm client versions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.15.2
    • Fix Version/s: 3.15.2
    • Component/s: NPM

      Description

      In recent versions of npm (I'm using 6.9.0) the authentication token that is saved to the .npmrc file is incompatible with nexus, which makes the whole npm adduser command redundant.

      so, if I do:

      npm adduser --registry https://my.registry.com/

      I get this added to my .npmrc

      //my.registry.com/:_authToken=NpmToken.e33cd56f-ddac-3fcb-aae1-ac0c09e1d127
      

      After this, any step that I perform fails with a HTTP 401, including the same adduser command or any install command.

      The only way to correctly authenticate is the _auth base64 token detailed in https://support.sonatype.com/hc/en-us/articles/115015110067-Using-User-Token-s-with-NPM

      Effectively, by not supporting these type of tokens, I believe that the bugfix from NEXUS-7989 has regressed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              KWright Kristofer Wright [X] (Inactive)
              Reporter:
              steveworkman Steve Workman
              Last Updated By:
              Joe Tom Joe Tom
              Team:
              NXRM - Cypher
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title