-
Type:
Bug
-
Status: Done
-
Resolution: Fixed
-
Affects Version/s: 7.0.0, 6.16.0
-
Component/s: NPM, Remote Repository
-
Labels:
-
Severity:High
-
Requirement Status:
GitHub Packages only supports Scoped packages:
https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages#publishing-a-package:
^^^ Search for "GitHub Packages only supports scoped npm packages"
Artifactory can receive back the package.json (npm metadata) from Github correctly. However it will still fail due to a JSON parsing issue and will a 404 to the client as result.
Steps to reproduce:
1. Steps to configure the remote:
a. Utilize the following URL: https://npm.pkg.github.com
b. You must enable the Bypass HEAD request on the remote
c. Define the Github User + Access Token (generate it from your GitHub account page)
2. Upload and resolve a package to GitHub Packages by following this guide:
Or; use the below command to retrieve an already published test package:
url -Lvv "http://localhost:8080/artifactory/api/npm/npm-github/@andreikom/npmtest" -uadmin:password
You will get the following error in the log:
2019-12-02T15:32:41.784Z [jfrt ] [ERROR] [e458f73bd1278d0 ] [a.n.r.NpmRemoteRepoHandler:459] [ttp-nio-8082-exec-17] - Error while parsing the response of a remote npm JSON query on 'https://npm.pkg.github.com/@andreikom%2Fnpmtest': Invalid package.json format. The dependencies field cannot be parsed. (through reference chain: org.jfrog.repomd.npm.model.NpmPackageMetadata["versions"]->org.jfrog.repomd.npm.model.NpmMetadata["dependencies"])