npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.48k stars 3.17k forks source link

[BUG] publish returns 403 #5219

Closed prettydiff closed 2 years ago

prettydiff commented 2 years ago

Is there an existing issue for this?

This issue exists in the latest npm version

Current Behavior

Attempting to publish an existing package that I own and already exists on the registry. Version on the registry is 0.2.10 and am attempting to publish version 0.2.13.

0 verbose cli C:\Program Files\nodejs\node.exe c:\users\austincheney\appdata\roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@8.15.0
2 info using node@v18.6.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:c:\users\austincheney\appdata\roaming\npm\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\austincheney\share-file-systems\.npmrc Completed in 0ms
10 timing config:load:project Completed in 6ms
11 timing config:load:file:C:\Users\austincheney\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\austincheney\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 20ms
19 timing npm:load:configload Completed in 20ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm publish
23 verbose argv "publish"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 5ms
26 timing npm:load:display Completed in 8ms
27 verbose logfile logs-max:10 dir:C:\Users\austincheney\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\austincheney\AppData\Local\npm-cache\_logs\2022-07-26T12_20_41_564Z-debug-0.log
29 timing npm:load:logFile Completed in 8ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 40ms
33 verbose publish [ '.' ]
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 notice
37 notice package: share-file-systems@0.2.13
38 notice === Tarball Contents ===
39 notice 846B    .github/ISSUE_TEMPLATE/bug_report.md                                 
39 notice 691B    .github/ISSUE_TEMPLATE/feature_request.md                            
39 notice 654B    .github/ISSUE_TEMPLATE/question.md                                   
39 notice 596B    .swcrc                                                               
39 notice 70B     bin/share-files                                                      
39 notice 2.1kB   code_of_conduct.md                                                   
39 notice 8.3kB   documentation/code_style_explained.md                                
39 notice 7.2kB   documentation/code_style.md                                          
39 notice 18.7kB  documentation/commands.md                                            
39 notice 1.3kB   documentation/credits.md                                             
39 notice 3.5kB   documentation/electron_tauri.md                                      
39 notice 5.2kB   documentation/installation.md                                        
39 notice 33.7kB  documentation/library_list.md                                        
39 notice 10.1kB  documentation/linuxVM.md                                             
39 notice 9.3kB   documentation/modal.md                                               
39 notice 1.8kB   documentation/readme.md                                              
39 notice 1.5kB   documentation/screenshots.md                                         
39 notice 2.1MB   documentation/screenshots/browser_darkScheme_expandedFS.png          
39 notice 2.0MB   documentation/screenshots/browser_darkScheme_manyModals.png          
39 notice 982.1kB documentation/screenshots/browser_defaultScheme_manyModals.png       
39 notice 57.8kB  documentation/screenshots/terminal_build.png                         
39 notice 50.2kB  documentation/screenshots/terminal_commands_directory.png            
39 notice 57.1kB  documentation/screenshots/terminal_commands.png                      
39 notice 8.8kB   documentation/security_model.md                                      
39 notice 27.2kB  documentation/test_browser.md                                        
39 notice 3.7kB   index.html                                                           
39 notice 2.6kB   install.js                                                           
39 notice 1.7kB   js/lib/terminal/utilities/entry.js                                   
39 notice 25.9kB  lib/browser/content/configuration.ts                                 
39 notice 33.3kB  lib/browser/content/context.ts                                       
39 notice 74.6kB  lib/browser/content/file_browser.ts                                  
39 notice 16.5kB  lib/browser/content/global_events.ts                                 
39 notice 24.9kB  lib/browser/content/invite.ts                                        
39 notice 10.6kB  lib/browser/content/media.ts                                         
39 notice 25.2kB  lib/browser/content/message.ts                                       
39 notice 1.2kB   lib/browser/content/readme.md                                        
39 notice 34.3kB  lib/browser/content/share.ts                                         
39 notice 29.4kB  lib/browser/content/tutorial.ts                                      
39 notice 28.2kB  lib/browser/localhost.ts                                             
39 notice 409B    lib/browser/readme.md                                                
39 notice 1.9kB   lib/browser/utilities/agent_hash.ts                                  
39 notice 13.0kB  lib/browser/utilities/agent_management.ts                            
39 notice 4.0kB   lib/browser/utilities/agent_status.ts                                
39 notice 86.6kB  lib/browser/utilities/audio.ts                                       
39 notice 897B    lib/browser/utilities/browser.ts                                     
39 notice 10.5kB  lib/browser/utilities/dom.ts                                         
39 notice 58.4kB  lib/browser/utilities/modal.ts                                       
39 notice 5.8kB   lib/browser/utilities/network.ts                                     
39 notice 1.5kB   lib/browser/utilities/readme.md                                      
39 notice 26.1kB  lib/browser/utilities/remote.ts                                      
39 notice 32.4kB  lib/browser/utilities/util.ts                                        
39 notice 4.0kB   lib/browser/utilities/webSocket.ts                                   
39 notice 11.0kB  lib/certificate/ca.cnf                                               
39 notice 90B     lib/certificate/readme.md                                            
39 notice 11.0kB  lib/certificate/selfSign.cnf                                         
39 notice 11.5kB  lib/common/common.ts                                                 
39 notice 2.2kB   lib/common/disallowed.ts                                             
39 notice 435B    lib/common/readme.md                                                 
39 notice 4.9kB   lib/configurations.json                                              
39 notice 12.5kB  lib/css/color-dark.css                                               
39 notice 13.3kB  lib/css/color-default.css                                            
39 notice 370.1kB lib/css/localhost.css                                                
39 notice 1.2kB   lib/electron.ts                                                      
39 notice 3.2MB   lib/media/background-desert_night.jpg                                
39 notice 277.4kB lib/media/background-desert.jpg                                      
39 notice 317B    lib/readme.md                                                        
39 notice 44B     lib/settings/message_archive/message_archive.txt                     
39 notice 93B     lib/settings/settings.txt                                            
39 notice 72B     lib/storage/storage.txt                                              
39 notice 853B    lib/tauri.ts                                                         
39 notice 649B    lib/terminal/commands/interface/agent_data.ts                        
39 notice 892B    lib/terminal/commands/interface/agent_online.ts                      
39 notice 1.6kB   lib/terminal/commands/interface/base64.ts                            
39 notice 727B    lib/terminal/commands/interface/build.ts                             
39 notice 3.8kB   lib/terminal/commands/interface/certificate.ts                       
39 notice 717B    lib/terminal/commands/interface/commands.ts                          
39 notice 1.3kB   lib/terminal/commands/interface/copy.ts                              
39 notice 7.4kB   lib/terminal/commands/interface/directory.ts                         
39 notice 1.3kB   lib/terminal/commands/interface/get.ts                               
39 notice 3.6kB   lib/terminal/commands/interface/hash.ts                              
39 notice 821B    lib/terminal/commands/interface/lint.ts                              
39 notice 1.3kB   lib/terminal/commands/interface/mkdir.ts                             
39 notice 2.6kB   lib/terminal/commands/interface/readme.md                            
39 notice 960B    lib/terminal/commands/interface/remove.ts                            
39 notice 1.7kB   lib/terminal/commands/interface/service.ts                           
39 notice 2.3kB   lib/terminal/commands/interface/test_browser.ts                      
39 notice 2.4kB   lib/terminal/commands/interface/test_service.ts                      
39 notice 1.8kB   lib/terminal/commands/interface/test_simulation.ts                   
39 notice 925B    lib/terminal/commands/interface/test.ts                              
39 notice 363B    lib/terminal/commands/interface/version.ts                           
39 notice 3.6kB   lib/terminal/commands/interface/websocket.ts                         
39 notice 13.5kB  lib/terminal/commands/library/agent_data.ts                          
39 notice 8.2kB   lib/terminal/commands/library/agent_online.ts                        
39 notice 6.3kB   lib/terminal/commands/library/base64.ts                              
39 notice 119.0kB lib/terminal/commands/library/build.ts                               
39 notice 6.9kB   lib/terminal/commands/library/certificate.ts                         
39 notice 2.2kB   lib/terminal/commands/library/commands.ts                            
39 notice 11.5kB  lib/terminal/commands/library/copy.ts                                
39 notice 26.3kB  lib/terminal/commands/library/directory.ts                           
39 notice 2.2kB   lib/terminal/commands/library/get.ts                                 
39 notice 10.7kB  lib/terminal/commands/library/hash.ts                                
39 notice 1.8kB   lib/terminal/commands/library/lint.ts                                
39 notice 3.8kB   lib/terminal/commands/library/mkdir.ts                               
39 notice 1.9kB   lib/terminal/commands/library/readme.md                              
39 notice 7.1kB   lib/terminal/commands/library/remove.ts                              
39 notice 5.1kB   lib/terminal/commands/library/update.ts                              
39 notice 7.0kB   lib/terminal/server/osNotification.ts                                
39 notice 3.1kB   lib/terminal/server/readCerts.ts                                     
39 notice 402B    lib/terminal/server/readme.md                                        
39 notice 3.0kB   lib/terminal/server/services/agent_hash.ts                           
39 notice 7.0kB   lib/terminal/server/services/agent_management.ts                     
39 notice 1.3kB   lib/terminal/server/services/agent_online.ts                         
39 notice 2.1kB   lib/terminal/server/services/agent_status.ts                         
39 notice 753B    lib/terminal/server/services/browserLog.ts                           
39 notice 4.4kB   lib/terminal/server/services/deviceMask.ts                           
39 notice 46.4kB  lib/terminal/server/services/fileCopy.ts                             
39 notice 2.1kB   lib/terminal/server/services/fileExecution.ts                        
39 notice 27.7kB  lib/terminal/server/services/fileSystem.ts                           
39 notice 1.5kB   lib/terminal/server/services/hashShare.ts                            
39 notice 10.7kB  lib/terminal/server/services/invite.ts                               
39 notice 6.6kB   lib/terminal/server/services/message.ts                              
39 notice 1.7kB   lib/terminal/server/services/readme.md                               
39 notice 2.8kB   lib/terminal/server/services/settings.ts                             
39 notice 7.0kB   lib/terminal/server/transmission/ipResolve.ts                        
39 notice 10.1kB  lib/terminal/server/transmission/methodGET.ts                        
39 notice 1.1kB   lib/terminal/server/transmission/readme.md                           
39 notice 2.4kB   lib/terminal/server/transmission/receiver.ts                         
39 notice 993B    lib/terminal/server/transmission/responder.ts                        
39 notice 6.2kB   lib/terminal/server/transmission/sender.ts                           
39 notice 43.7kB  lib/terminal/server/transmission/transmit_http.ts                    
39 notice 1.0kB   lib/terminal/server/transmission/transmit_logger.ts                  
39 notice 40.8kB  lib/terminal/server/transmission/transmit_ws.ts                      
39 notice 47.3kB  lib/terminal/test/application/browser.ts                             
39 notice 4.9kB   lib/terminal/test/application/browserUtilities/file_path_decode.ts   
39 notice 767B    lib/terminal/test/application/browserUtilities/file_path_encode.ts   
39 notice 1.8kB   lib/terminal/test/application/browserUtilities/inviteAccept.ts       
39 notice 1.4kB   lib/terminal/test/application/browserUtilities/inviteConfirm.ts      
39 notice 935B    lib/terminal/test/application/browserUtilities/inviteModal.ts        
39 notice 3.1kB   lib/terminal/test/application/browserUtilities/inviteSend.ts         
39 notice 2.4kB   lib/terminal/test/application/browserUtilities/login.ts              
39 notice 1.7kB   lib/terminal/test/application/browserUtilities/machines.ts           
39 notice 1.2kB   lib/terminal/test/application/browserUtilities/mainMenu.ts           
39 notice 2.2kB   lib/terminal/test/application/browserUtilities/modalAddress.ts       
39 notice 1.9kB   lib/terminal/test/application/browserUtilities/moveToSandbox.ts      
39 notice 3.7kB   lib/terminal/test/application/browserUtilities/newDirectory.ts       
39 notice 1.8kB   lib/terminal/test/application/browserUtilities/readme.md             
39 notice 839B    lib/terminal/test/application/browserUtilities/showContextMenu.ts    
39 notice 16.3kB  lib/terminal/test/application/evaluation.ts                          
39 notice 875B    lib/terminal/test/application/readme.md                              
39 notice 1.8kB   lib/terminal/test/application/runner.ts                              
39 notice 11.1kB  lib/terminal/test/application/service.ts                             
39 notice 2.6kB   lib/terminal/test/application/simulation.ts                          
39 notice 1.0kB   lib/terminal/test/application/testComplete.ts                        
39 notice 70.5kB  lib/terminal/test/samples/browser_device.ts                          
39 notice 149.8kB lib/terminal/test/samples/browser_self.ts                            
39 notice 92.5kB  lib/terminal/test/samples/browser_user.ts                            
39 notice 769B    lib/terminal/test/samples/readme.md                                  
39 notice 103.9kB lib/terminal/test/samples/service.ts                                 
39 notice 29.2kB  lib/terminal/test/samples/simulation.ts                              
39 notice 0B      lib/terminal/test/storageBrowser/_newDirectory-2/_newFile-2_0        
39 notice 4.0kB   lib/terminal/test/storageBrowser/_newDirectory-2/configuration_0.json
39 notice 0B      lib/terminal/test/storageBrowser/_newFile-1                          
39 notice 8.9kB   lib/terminal/test/storageBrowser/configuration.json                  
39 notice 935B    lib/terminal/test/storageBrowser/device.json                         
39 notice 4.1kB   lib/terminal/test/storageTest/configuration.json                     
39 notice 5.1kB   lib/terminal/test/storageTest/device.json                            
39 notice 64B     lib/terminal/test/storageTest/temp/temp.txt                          
39 notice 4.6kB   lib/terminal/utilities/commandList.ts                                
39 notice 4.2kB   lib/terminal/utilities/commandName.ts                                
39 notice 28.8kB  lib/terminal/utilities/commands_documentation.ts                     
39 notice 1.8kB   lib/terminal/utilities/entry.ts                                      
39 notice 5.1kB   lib/terminal/utilities/error.ts                                      
39 notice 677B    lib/terminal/utilities/getAddress.ts                                 
39 notice 3.2kB   lib/terminal/utilities/humanTime.ts                                  
39 notice 4.3kB   lib/terminal/utilities/lists.ts                                      
39 notice 2.4kB   lib/terminal/utilities/log.ts                                        
39 notice 2.3kB   lib/terminal/utilities/readme.md                                     
39 notice 3.4kB   lib/terminal/utilities/readStorage.ts                                
39 notice 5.1kB   lib/terminal/utilities/rename.ts                                     
39 notice 369B    lib/terminal/utilities/terminal.ts                                   
39 notice 2.7kB   lib/terminal/utilities/time.ts                                       
39 notice 12.7kB  lib/terminal/utilities/vars.ts                                       
39 notice 3.1kB   lib/terminal/utilities/wrapIt.ts                                     
39 notice 1.6kB   lib/terminal/utilities/writeStream.ts                                
39 notice 6.7kB   lib/typescript/browser.d.ts                                          
39 notice 18.9kB  lib/typescript/config.ts                                             
39 notice 3.9kB   lib/typescript/environment.d.ts                                      
39 notice 1.1kB   lib/typescript/fileService.d.ts                                      
39 notice 4.5kB   lib/typescript/global.d.ts                                           
39 notice 36.2kB  lib/typescript/modules_browser.d.ts                                  
39 notice 32.5kB  lib/typescript/modules_terminal.d.ts                                 
39 notice 1.5kB   lib/typescript/readme.md                                             
39 notice 8.8kB   lib/typescript/services.d.ts                                         
39 notice 20.5kB  lib/typescript/terminal.d.ts                                         
39 notice 4.7kB   lib/typescript/test.d.ts                                             
39 notice 6.4kB   lib/typescript/types.d.ts                                            
39 notice 34.1kB  license                                                              
39 notice 6.4kB   module.mjs                                                           
39 notice 1.5kB   package.json                                                         
39 notice 4.3kB   readme.md                                                            
39 notice 546B    tsconfig.json                                                        
40 notice === Tarball Details ===
41 notice name:          share-file-systems                      
41 notice version:       0.2.13                                  
41 notice filename:      share-file-systems-0.2.13.tgz           
41 notice package size:  9.2 MB                                  
41 notice unpacked size: 11.2 MB                                 
41 notice shasum:        2fce84420d8ad002cc9b0940556995f3494507b8
41 notice integrity:     sha512-u+SNjYwXG7DFh[...]w8RFf71+yJiNg==
41 notice total files:   201                                     
42 notice
43 notice Publishing to https://registry.npmjs.org/
44 http fetch PUT 403 https://registry.npmjs.org/share-file-systems 591ms
45 timing command:publish Completed in 1974ms
46 verbose stack HttpErrorGeneral: 403 Forbidden - PUT https://registry.npmjs.org/share-file-systems
46 verbose stack     at c:\users\austincheney\appdata\roaming\npm\node_modules\npm\node_modules\npm-registry-fetch\lib\check-response.js:93:15
46 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
46 verbose stack     at async publish (c:\users\austincheney\appdata\roaming\npm\node_modules\npm\node_modules\libnpmpublish\lib\publish.js:43:12)
46 verbose stack     at async otplease (c:\users\austincheney\appdata\roaming\npm\node_modules\npm\lib\utils\otplease.js:3:12)
46 verbose stack     at async Publish.exec (c:\users\austincheney\appdata\roaming\npm\node_modules\npm\lib\commands\publish.js:120:7)
46 verbose stack     at async module.exports (c:\users\austincheney\appdata\roaming\npm\node_modules\npm\lib\cli.js:78:5)
47 verbose statusCode 403
48 verbose pkgid share-file-systems@0.2.13
49 verbose cwd C:\Users\austincheney\share-file-systems
50 verbose Windows_NT 10.0.19044
51 verbose node v18.6.0
52 verbose npm  v8.15.0
53 error code E403
54 error 403 403 Forbidden - PUT https://registry.npmjs.org/share-file-systems
55 error 403 In most cases, you or one of your dependencies are requesting
55 error 403 a package version that is forbidden by your security policy, or
55 error 403 on a server you do not have access to.
56 verbose exit 1
57 timing npm Completed in 2055ms
58 verbose code 1
59 error A complete log of this run can be found in:
59 error     C:\Users\austincheney\AppData\Local\npm-cache\_logs\2022-07-26T12_20_41_564Z-debug-0.log

Expected Behavior

New version published to registry.

Steps To Reproduce

npm publish

Environment

prefix = "C:\Users\austincheney\AppData\Roaming\npm"

; "user" config from C:\Users\austincheney.npmrc

//registry.npmjs.org/:_authToken = (protected)

; node bin location = C:\Program Files\nodejs\node.exe ; node version = v18.6.0 ; npm local prefix = C:\Users\austincheney\share-file-systems ; npm version = 8.15.0 ; cwd = C:\Users\austincheney\share-file-systems ; HOME = C:\Users\austincheney ; Run npm config ls -l to show all defaults.

prettydiff commented 2 years ago

It would be helpful if the log indicated the cause for the 403.

fritzy commented 2 years ago

Closing: this looks to be an issue with the registry which is outside the scope of this repo. For registry support please go to npmjs.com/support. If you believe this is a bug with the cli, please provide further clarifying details.