title: Password protected jenkins maven repository server - access from maven
body: <p>I've got a password protected jenkins server with the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Maven+Repository+Server" rel="nofollow noreferrer">Jenkins Maven Repository Server</a> plugin. My problem is, as it is password protected, i can't access the /plugin/repository/everything/ repo from within maven (<code>Could not transfer metadata &lt;metadata&gt; from/to &lt;repo-name&gt; (http://ci.mydomain.com/plugin/repository/everything/): Access denied to: &lt;repo&gt;/&lt;identifier&gt; , ReasonPhrase:Forbidden.</code>)</p>
  
  <p>What i tried:<br>
  - <a href="https://stackoverflow.com/a/27025081">Putting the server credentials in the .m2/settings.xml</a><br>
  - Basic auth: <code>http://&lt;user&gt;:&lt;password&gt;@ci.mydomain.com/&lt;repo&gt;</code><br>
  - without any auth  </p>
  
  <p>none worked...</p>
  
  <p>any help would be appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>My settings.xml:</p>
  
  <pre><code>&lt;settings&gt;
    &lt;servers&gt;
        &lt;server&gt;
          &lt;id&gt;test-ci&lt;/id&gt;
          &lt;username&gt;jenkins&lt;/username&gt;
          &lt;password&gt;password&lt;/password&gt;
      &lt;/server&gt;
    &lt;/servers&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>and my pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project&gt;
  
      &lt;groupId&gt;com.mygroup&lt;/groupId&gt;
      &lt;artifactId&gt;Artifact&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;test-ci&lt;/id&gt;
              &lt;url&gt;http://ci.mydomain.com/plugin/repository/everything/&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mygroup&lt;/groupId&gt;
              &lt;artifactId&gt;ProjectOnCi&lt;/artifactId&gt;
              &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>