我目前正在try 建立一个Jenkins和一个私有npm存储库(Sonatype Nexus).
+ npm publish --registry https://<my-private-registry>/repository/npm-private/
npm notice
npm notice package: ts-acoustics@0.0.0
npm notice === Tarball Contents ===
npm notice 2.4kB Jenkinsfile
...
('notice' level info about the files)
...
npm notice === Tarball Details ===
npm notice name: ts-acoustics
npm notice version: 0.0.0
npm notice package size: 13.8 kB
npm notice unpacked size: 47.5 kB
npm notice shasum: 554b6d2b41321d78e00f6a309bb61c9181a2e3d6
npm notice integrity: sha512-QtExdu6IqZ+lH[...]r+HXolo4YCFPg==
npm notice total files: 17
npm notice
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://<my-private-registry>/repository/npm-private/ts-acoustics
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
我在Nexus日志(log)中找不到关于为什么它被禁止的更多信息,this open GitHub bug告诉我,在大多数情况下,上面的错误文本指向错误的方向?!
你知道如何继续让出版工作吗?!
Update 1: I just saw that I have the same problem when I try to publish it manually!所以jenkins 因为简单的原因被排除在等式之外.
Update 2:我能做npm adduser --registry...
,npm告诉我
Logged in as <my-user> on https://<my-private-registry>/repository/npm-private/.
当我输入npm whoami --registry...
时,它会显示正确的用户名.
当我在项目中执行npm publish --registry...
时,它显示403错误