title: "npm publish" not working in Team City
body: <p>I am trying to use Team City CI to run tests and publish the NPM package to local sinopia repository. I had setup sinopia repository on a server and i can successfully publish npm packages to that repository with <code>npm publish</code> command from my local machine.</p>
  
  <p>But when i try to automate this in Team City , i am getting authentication error as shown below.</p>
  
  <p><a href="https://i.stack.imgur.com/OCygC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OCygC.png" alt="enter image description here"></a></p>
  
  <p>Team City Build steps are :</p>
  
  <pre><code>1.  npm install
  2.  npm test
  3.  npm set @scoped:registry http://{host}:{port}
      npm publish
  </code></pre>
  
  <p>1, 2 steps are running fine. But throwing above error on 3rd step.  It definitely has to do with authenticating the Team City server with Sinopia server. Both are installed in different machines.</p>
  
  <p>Is there any way i can pass <code>auth token</code> to sinopia before publishing a package.</p>
  
  <p>NOTE :  I can publish NPM packages to <code>Octopus Deploy</code> library and deploy those packages into server automatically.</p>