0
我們已經用jfrog artifactory saas設置了一個npm。 npm同時具有npm-local和npm-remote存儲庫。npm安裝不能使用jfrog artifactory saas賬戶
npm-remote存儲庫使用默認設置指向https://registry.npmjs.org。
我有如下(以下從artifactory的指令)的〜/ .npmrc
_auth="[auth]"
email=[email address]
always-auth=true
registry=https://[company-name].jfrog.io/centricsoftware/api/npm/npm/
我甚至能夠發佈一個NPM模塊到jfrog artifactory的服務器。
我有麻煩通過jfrog artifactory的安裝NPM模塊
$>npm install express
npm ERR! code E401
npm ERR! 401 Unauthorized: [email protected]^4.15.3
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/[user]/.npm/_logs/2017-06-28T12_14_24_852Z-debug.log
日誌文件的內容如下
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'express' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 91f67a25a5bc9570
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 401 https://centricsoftware.jfrog.io/centricsoftware/api/npm/npm/express 6360ms
8 silly fetchPackageMetaData error for [email protected]^4.15.3 401 Unauthorized: [email protected]^4.15.3
9 verbose stack Error: 401 Unauthorized: [email protected]^4.15.3
9 verbose stack at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19)
9 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
9 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
9 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
9 verbose stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
9 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
9 verbose stack at runCallback (timers.js:800:20)
9 verbose stack at tryOnImmediate (timers.js:762:5)
9 verbose stack at processImmediate [as _immediateCallback] (timers.js:733:5)
10 verbose cwd /Users/rohitghatol/tmp/try
11 verbose Darwin 16.6.0
12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express"
13 verbose node v8.1.2
14 verbose npm v5.0.4
15 error code E401
16 error 401 Unauthorized: [email protected]^4.15.3
17 verbose exit [ 1, true ]
我該怎麼錯在這裏?
乾杯 羅希特