title: Access denied when trying to deploy jars to a Nexus 3 repository using Maven but able to download dependencies
body: <p>I have installed Nexus 3 on a server with the following repositories:</p>
  
  <p>First repo:</p>
  
  <pre><code>Name: maven-central, 
  Type: proxy, 
  Layout policy: Permissive, 
  URL: http://ip:port/nexus/repository/maven-central/,
  Remote storage: https://repo1.maven.org/maven2/
  </code></pre>
  
  <p>Second repo:</p>
  
  <pre><code>Name: own,
  Type: hosted,
  Version policy: Mixed,
  Layout policy: Permissive,
  URL: http://ip:port/nexus/repository/own/
  </code></pre>
  
  <p>Repo group:</p>
  
  <pre><code>Name: whatever,
  Format: maven2,
  Type: group,
  Members: maven-central, own
  URL: http://ip:port/nexus/repository/whatever/
  </code></pre>
  
  <p>I have installed the SSL certificates for the following repos: repo1.maven.org and for repo.maven.apache.org.</p>
  
  <p>The settings.xml has the following structure: </p>
  
  <pre><code>    &lt;localRepository&gt;${user.home}/.m2/repository&lt;/localRepository&gt;
  
  
      &lt;profiles&gt;
          &lt;profile&gt;
          &lt;activation&gt;
              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
          &lt;repositories&gt;
              &lt;repository&gt;
                  &lt;id&gt;maven-repository&lt;/id&gt;
                  &lt;url&gt;http://ip:port/nexus/repository/whatever/&lt;/url&gt;
                  &lt;snapshots&gt;    
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/snapshots&gt;   
              &lt;/repository&gt;
           &lt;/repositories&gt;
  
           &lt;pluginRepositories&gt;
                  &lt;pluginRepository&gt;
                          &lt;id&gt;maven-repository-plugin&lt;/id&gt;
                          &lt;name&gt;maven-repository-plugin&lt;/name&gt;
                          &lt;url&gt;http://ip:port/nexus/repository/whatever/&lt;/url&gt;
                          &lt;releases&gt;
                                  &lt;enabled&gt;true&lt;/enabled&gt;
                          &lt;/releases&gt;
                          &lt;snapshots&gt;
                              &lt;enabled&gt;true&lt;/enabled&gt;
                              &lt;updatePolicy&gt;interval:15&lt;/updatePolicy&gt;
                              &lt;checksumPolicy&gt;fail&lt;/checksumPolicy&gt;
                          &lt;/snapshots&gt;
                  &lt;/pluginRepository&gt;
          &lt;/pluginRepositories&gt;
  
  &lt;/profiles&gt; 
  
  &lt;servers&gt;
      &lt;server&gt;
          &lt;id&gt;maven-repository&lt;/id&gt;
          &lt;username&gt;admin&lt;/username&gt;
          &lt;password&gt;**&lt;/password&gt;
      &lt;/server&gt;
  &lt;/servers&gt; 
  </code></pre>
  
  <p>The problem is that I am able to use this settings.xml file to download project dependencies but I am not able to deploy files using Maven because I get the following error:</p>
  
  <p><code>Failed to deploy artifacts groupId:artifactId:version:jar:version from/to remote-repository(http://ip:port/nexus/repository/whatever): Access denied to: http://ip:port/nexus/repository/whatever/groupId/artifactId/...</code>, </p>
  
  <p>when running the following deploy command:</p>
  
  <pre><code> deploy:deploy-file   
  -Durl=http://ip:port/nexus/repository/own/
  -DgeneratePom=false   
  -DgroupId=groupId  
  -DartifactId=artifactId 
  -Dversion=version  
  -Dpackaging=jar   
  -Dfile=name.jar  
  </code></pre>
  
  <p>Is there anything I can do? I have tried changing the repositories to use the hosted repo(own) instead of the group, I have tried adding mirrors in the settings.xml file.</p>
  
  <p>I have to mention that the user is the default admin which has the default roles(All).</p>
  
  <p>I was thinking that it might be a problem with the SSL inbound certificates, but in Nexus 3 I don't know how to disable the check. Also there is no possibility at the moment to upload the jars manually.</p>
  
  <p>Edit: I also tried adding mirrors, but when I add the mirrors the download stops working. 
  2nd edit: With HTTP I was able to upload files(using CURL)</p>