title: TeamCity Agent error: Failed to publish artifacts: Authentication required
body: <p>I am using TeamCity 9.0.1. The TC server was just migrated from another machine, and now none of my build agents can publish artifacts. They show the following error in the build log:</p>
  
  <pre><code>[11:40:20][Publishing artifacts] Publishing using [WebPublisher]
  [11:40:20][Publishing artifacts] Publishing using [ArtifactsCachePublisher]
  [11:40:22][Publishing artifacts] Failed to publish artifacts: Authentication required
  To login manually go to "/login.html" page
  </code></pre>
  
  <p>The server is behind an nginx reverse proxy. The server has LDAP, Built-in and Basic HTTP auth modules installed. How do agents authenticate with the server and why would it fail with this message? The builds seem to run just fine, they only can't upload the artifacts.</p>