我在Artifactory 5.4.6上建立了一个私人NPM存储库。
在NPM 3.10.10中,我能够使用以下命令从空的~/.npmrc
开始为此创建凭证:
npm adduser --registry = https://artifactory.luciad.com/artifactory/api/npm/product_release_npm --scope = @ luciad --always-auth
当我尝试在NPM 6.4.1中使用完全相同凭据运行完全相同命令时,对于完全相同私有使用相同的 exaxt 设置进行回购,同样从空的~/.npmrc
开始,出现以下错误:
npm ERR! code E404
npm ERR! 404 Registry returned 404 for PUT on https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers
npm ERR! 404
npm ERR! 404 'org.couchdb.user:jslegers' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404 1. name can only contain URL-friendly characters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jslegers.LUCIAD\AppData\Roaming\npm-cache\_logs\2019-01-30T16_00_02_039Z-debug.log
当我查看日志文件时,看到以下内容:
6 http request → POST https://artifactory.luciad.com/artifactory/api/npm/-/v1/login
7 http 404 ← Not Found (https://artifactory.luciad.com/artifactory/api/npm/-/v1/login)
8 verbose web login not supported, trying couch
9 verbose login before first PUT { _id: 'org.couchdb.user:jslegers',
9 verbose login name: 'jslegers',
9 verbose login password: 'XXXXX',
9 verbose login type: 'user',
9 verbose login roles: [],
9 verbose login date: '2019-01-30T16:00:02.008Z' }
10 http request → PUT https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers
11 http 404 ← Not Found (https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers)
12 verbose adduser before first PUT { _id: 'org.couchdb.user:jslegers',
12 verbose adduser name: 'jslegers',
12 verbose adduser password: 'XXXXX',
12 verbose adduser email: 'john.slegers@hexagon.com',
12 verbose adduser type: 'user',
12 verbose adduser roles: [],
12 verbose adduser date: '2019-01-30T16:00:02.024Z' }
13 http request → PUT https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers
14 http 404 ← Not Found (https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers)
15 verbose stack Error: Registry returned 404 for PUT on https://artifactory.luciad.com/artifactory/api/npm/-/user/org.couchdb.user:jslegers
知道为什么npm adduser
在这里失败了吗?
如果我重新使用在NPM 3.10.10中创建的凭据,则可以使用NPM 6.4.1毫无问题地进行发布,因此,这绝对不是Artifactory中的授权问题。
根据发行说明,Artifactory 5.4.6于2017年8月7日发布。自{2017年8月7日以来,npm adduser
的实现可能发生了任何更改,可能会破坏与旧版本的兼容性。的工厂?