正如标题中所说,尽管AWS CodeArtifact (Successfully configured npm to use AWS CodeArtifact repository https://xxxxxx.d.codeartifact.xxxx.amazonaws.com/npm/xxxx-npm/
)成功地配置了npm
和.npmrc
中正确的配置
registry=https://xxxxxx.d.codeartifact.xxxx.amazonaws.com/npm/xxxx-npm/
//xxxxxx.d.codeartifact.xxxx.amazonaws.com/npm/xxxx-npm/:_authToken=<MY_TOKEN>)
每次尝试通过npm i
安装以失败告终,说认证令牌无效,并要求我npm login
。当我做的,这提示:
npm login
npm notice Log in on https://xxxxxx.d.codeartifact.xxxx.amazonaws.com/npm/xxxx-npm/
Username:
我不知道该提供什么作为用户名/密码,因为我们的组织使用SSO。
npm -d ping
输出:
npm info using npm@8.0.0
npm info using node@v14.17.6
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/Users/abcdefgh/.nvm/versions/node/v14.17.6/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/Users/abcdefgh/Documents/Projects/project-backend/.npmrc Completed in 0ms
npm timing config:load:project Completed in 1ms
npm timing config:load:file:/Users/abcdefgh/.npmrc Completed in 1ms
npm timing config:load:user Completed in 1ms
npm timing config:load:file:/Users/abcdefgh/.nvm/versions/node/v14.17.6/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 1ms
npm timing config:load:credentials Completed in 1ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 9ms
npm timing npm:load:configload Completed in 9ms
npm timing npm:load:setTitle Completed in 14ms
npm timing npm:load:setupLog Completed in 1ms
npm timing config:load:flatten Completed in 2ms
npm timing npm:load:cleanupLog Completed in 2ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load:projectScope Completed in 1ms
npm timing npm:load Completed in 33ms
npm notice PING https://xxxxxx.d.codeartifact.xxxx.amazonaws.com/npm/xxxx-npm/
npm notice PONG 279ms
npm timing command:ping Completed in 279ms
npm timing npm Completed in 468ms
npm info ok
我不知道问题出在哪里。有人能提供一些见解吗?这是f***** npm。我最近从6.14.12 ->显然,整个令牌和登录机制在新的npm中崩溃了。