title: Maven Not authorized , ReasonPhrase:Unauthorized
body: <p>I am trying to check out my code from Nexus repository.
  First of all, I've generate the password with</p>
  
  <pre><code>mvn --encrypt-master-password _mypassword_
  </code></pre>
  
  <p>This is my c:/Users/joanet/.m2/settings-security.xml :</p>
  
  <pre><code>&lt;settingsSecurity&gt;
  &lt;master&gt;{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED2ws=}&lt;/master&gt;
  &lt;/settingsSecurity&gt;
  </code></pre>
  
  <p>and this is my c:/progs/PGM/apache-maven-3.0.5/conf/settings.xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
      &lt;!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
      license agreements. See the NOTICE file distributed with this work for additional
      information regarding copyright ownership. The ASF licenses this file to
      you under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of
      the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
      by applicable law or agreed to in writing, software distributed under the
      License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
      OF ANY KIND, either express or implied. See the License for the specific
      language governing permissions and limitations under the License. --&gt;
  
      &lt;!-- http://maven.apache.org/settings.html --&gt;
      &lt;settings xmlns="http://maven.apache.org/settings/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
      &lt;localRepository&gt;C:/Users/joanet/.m2/repository&lt;/localRepository&gt;
  
  
      &lt;proxies&gt;
       &lt;proxy&gt;
        &lt;id&gt;optional&lt;/id&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;protocol&gt;http&lt;/protocol&gt;
        &lt;username&gt;joanet&lt;/username&gt;
        &lt;password&gt;{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED5ws=}&lt;/password&gt;
        &lt;host&gt;157.129.133.11&lt;/host&gt;
        &lt;port&gt;8032&lt;/port&gt;
        &lt;nonProxyHosts&gt;localhost&lt;/nonProxyHosts&gt;
       &lt;/proxy&gt;
      &lt;/proxies&gt;
  
      &lt;servers&gt;
        &lt;server&gt;
         &lt;id&gt;ecPublicRepository&lt;/id&gt;
         &lt;username&gt;joanet&lt;/username&gt;
         &lt;password&gt;{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED5ws=}&lt;/password&gt;
        &lt;/server&gt;
  
  
      &lt;/servers&gt;
  
      &lt;mirrors&gt;&lt;/mirrors&gt;
  
      &lt;pluginGroups&gt;
       &lt;!-- pluginGroup Specifies a further group identifier to use for plugin lookup.  --&gt;
       &lt;pluginGroup&gt;com.oracle.weblogic&lt;/pluginGroup&gt;
       &lt;pluginGroup&gt;com.github.searls&lt;/pluginGroup&gt;
       &lt;pluginGroup&gt;com.cj.jshintmojo&lt;/pluginGroup&gt;
       &lt;pluginGroup&gt;com.github.phasebash&lt;/pluginGroup&gt;
  
      &lt;/pluginGroups&gt;
  
      &lt;profiles&gt;
       &lt;profile&gt;
        &lt;id&gt;activeProfile&lt;/id&gt;
  
        &lt;repositories&gt;
  
         &lt;repository&gt;
            &lt;id&gt;ecPublicRepository&lt;/id&gt;
            &lt;url&gt;https://foo.com/nexus/content/groups/public/&lt;/url&gt;
         &lt;/repository&gt;
  
  
        &lt;/repositories&gt;
  
        &lt;pluginRepositories&gt;
  
         &lt;pluginRepository&gt;
          &lt;id&gt;PublicRepository&lt;/id&gt;
          &lt;name&gt;Public Repository&lt;/name&gt;
          &lt;url&gt;https://foo.com/nexus/content/groups/public/&lt;/url&gt;
         &lt;/pluginRepository&gt;
        &lt;/pluginRepositories&gt;
  
       &lt;/profile&gt;
  
      &lt;/profiles&gt;
  
      &lt;!-- activeProfiles | List of profiles that are active for all builds. | --&gt;
      &lt;activeProfiles&gt;
       &lt;activeProfile&gt;activeProfile&lt;/activeProfile&gt;
      &lt;/activeProfiles&gt;
  
  
      &lt;/settings&gt;
  </code></pre>
  
  <p>but this is the error:</p>
  
  <pre><code>Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
   transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.3.1 from/
  to ecPublicRepository (https://foo.com/nexus/content/groups/public/): Not authorized , ReasonPhrase:Unauthorized.
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
  aultArtifactResolver.java:538)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
  facts(DefaultArtifactResolver.java:216)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
  fact(DefaultArtifactResolver.java:193)
          at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
  loadPom(DefaultArtifactDescriptorReader.java:281)
          ... 28 more
  </code></pre>