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

Does not support npm GitHub Package Registry

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.22.1, 3.24.0
    • Fix Version/s: 3.30.0
    • Component/s: NPM
    • Labels:

      Description

      Trying to create a proxy for npm.pkg.github.com, but Nexus does not work because it tries to pull the version from the tarball URL, and GitHub's URL is different than npmjs (see below return of npm.pkg.github.com).

      Here's an example of what happens on lookup:

      2020-04-30 03:26:56,669+0000 DEBUG [qtp1377384231-44]  admin org.sonatype.nexus.repository.storage.ComponentEntityAdapter - Finding components with query: select from component where (name = :p0 AND group = :p1 AND version = :p2) and (bucket=#18:3), parameters: {p0=my-package, p1=my-scope, p2=}
      

      And the component that gets created:

      {
            "id": "bnBtLWdpdGh1Yjo5M2I5YjllYjlhN2VjYjA2ZjY2YzIzOTZjNGMyOTJmZA",
            "repository": "npm-github",
            "format": "npm",
            "group": "my-scope",
            "name": "my-package",
            "version": "",
      }

      The return from npm.pkg.github.com:

      "dist": {
          "tarball""https://npm.pkg.github.com/download/@my-scope/my-package/1.0.0/fefec00003ec843faf348871f940dc5a0a4bfe56fd1d6c9678f7609533038489"
      },
      

      So it will work initially, creating a component with an empty version, but will not be able to look up/create other versions because it supports only a null version.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aishchenko Artem Ishchenko
              Reporter:
              tomsisk Tom Sisk
              Last Updated By:
              Hardeep Nagra Hardeep Nagra
              Team:
              NXRM - Trinity
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title