title: Unable to publish to an NPM Registry (local)
body: <p>I am running Nexus 3.0.1-01, and am using it to host both Maven repositories and NPM registries.  For NPM, I have a local mirror of npmjs.org, a local NPM registry and a group that combines the two...</p>
  
  <p><a href="https://i.stack.imgur.com/L09bv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L09bv.png" alt="enter image description here"></a></p>
  
  <p>I have been using this with npm internally, where I can use the npm-public group as my registry and this has been working fine.  So, I can use Nexus to mirror npmjs.</p>
  
  <p>The next step is to take locally written npm modules and publish them to npm-releases (on my Nexus instance) so that these modules can be shared amongst the delivery teams here.  I've been able to build out a package, and npm pack seems to behave.</p>
  
  <p>I have run npm adduser to provide my Nexus credentials to my npm environment.  I am using the same username/password I use when I log into the Nexus web app, and my user is assigned the admin role (so I should have all permissions).  I can see the credentials in my .npmrc file</p>
  
  <p><a href="https://i.stack.imgur.com/u15L9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/u15L9.png" alt="enter image description here"></a></p>
  
  <p>My registry value is still the npm-public <strong>group</strong> which combined the mirror and my local registry.  I have ensured that the package.json of the module I am attempting to deploy has a "publishConfig" section that points to the url of the local registry (not the public group)</p>
  
  <p><a href="https://i.stack.imgur.com/6QvC7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6QvC7.png" alt="enter image description here"></a></p>
  
  <p>However, despite all of that, calling "npm publish" results in a 401 error...</p>
  
  <p><a href="https://i.stack.imgur.com/phl17.png" rel="noreferrer"><img src="https://i.stack.imgur.com/phl17.png" alt="enter image description here"></a></p>
  
  <p>Looking at the npm-debug.log, I can see it's attempting to call the HTTP PUT call to push the assembled tgz file to the registry, and this is returning a 401 error</p>
  
  <p><a href="https://i.stack.imgur.com/xeVMV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xeVMV.png" alt="enter image description here"></a></p>
  
  <p>I have enabled debug logging on the shiro package in the server, but I only ever see a single message thinking it needs authentication</p>
  
  <pre><code>2016-09-13 08:56:28,590+1000 DEBUG [qtp1257823896-4030] *UNKNOWN org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter - Authentication required: sending 401 Authentication challenge response.
  </code></pre>
  
  <p>According to the documentation, I've done all I'm supposed to do (npm add user) but I am unable to successfully deploy an npm module to my local repository.</p>
  
  <p>Are there additional options I need to use when calling npm publish?  Are there additional settings I need to make to the hosted npm repository in my server that will allow me to publish to it?  I pretty much created it using the default values.  Have I missed a step that is preventing me from deploying to my hosted npm registry?</p>
  
  <p>Any help would be greatly appreciated, as I am stuck at the moment.</p>