You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Chris Mylonas <ch...@opencsta.org> on 2011/02/09 07:30:50 UTC

Authorization Denied for archiva-read-repository permission from maven

Hello List,

I'm following a book about maven and have set up a repository manager in
archiva - this user works when logging in via the web UI and also when
browsing directly to
archiva/repository/snapshots/..../1.0-SNAPSHOT/maven-metadata.xml (prompts
for username and password and these also work).

This is the log from archiva.log

Caused by: org.apache.maven.wagon.authorization.AuthorizationException:
Access denied to:
http://tour.opencsta.org:8080/archiva/repository/snapshots/org/opencsta/stack/1.0-SNAPSHOT/maven-metadata.xml

Helpppppppppp please!!

1.  I've set a "master password"  and have put it in the
~/.m2/settings-security.xml file like so:

<settingsSecurity>
  <master>{yyyyencyptedMasterPasswordyyyy=}</master>
</settingsSecurity>

Don't know exactly what it's for and think

2.  I've set my user password in the ~/.m2/conf/settings.xml file like so

<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">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers>
    <server>
      <id>snapshots</id>
      <username>username4chris</username>
      <password>{xxxxencyptedpasswordxxxx=}</password>
    </server>
  </servers>
  <mirrors/>
  <proxies/>
  <profiles/>
  <activeProfiles/>
</settings>

3.  My pom.xml file has the distribution management set correctly I'm
presuming otherwise the mvn deploy output would be going to the wrong url.

Cheers
Chris

Re: Authorization Denied for archiva-read-repository permission from maven

Posted by Chris Mylonas <ch...@opencsta.org>.
> > Ah ha!
> > Yep it's a typo - pg 61 of the Packt book (pg 78 in PDF form) has
> > .m2/conf/settings.xml
>
> Sorry about that - perhaps you can submit it here:
> https://www.packtpub.com/submit-errata
>

Done!

Thanks once again,
Chris

Re: Authorization Denied for archiva-read-repository permission from maven

Posted by Brett Porter <br...@apache.org>.
On 10/02/2011, at 8:34 AM, Chris Mylonas wrote:

> Ah ha!
> Yep it's a typo - pg 61 of the Packt book (pg 78 in PDF form) has
> .m2/conf/settings.xml

Sorry about that - perhaps you can submit it here: https://www.packtpub.com/submit-errata

> 
> So it deploys now... no need to use plain text password.
> 
> Thanks for that, and apart from the typo, excellent book Brett.  I've
> skimmed the whole lot and now slowly working my way through it - I'm moving
> my development from a bunch of ant scripts and manual moving of jar
> dependencies to maven - I'm looking forward to moving the opencsta project
> into the 21st century (and new website)!

Thanks!

> 
> Cheers from Sydney
> Chris
> 
> On Thu, Feb 10, 2011 at 12:33 AM, Brett Porter <br...@apache.org> wrote:
> 
>> 
>> 
>> On 09/02/2011, at 5:30 PM, Chris Mylonas wrote:
>> 
>>> 2.  I've set my user password in the ~/.m2/conf/settings.xml file like so
>> 
>> Is this a typo? It should be ~/.m2/settings.xml. You can use mvn
>> help:effective-settings to confirm.
>> 
>>> 
>>> <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">
>>> <localRepository/>
>>> <interactiveMode/>
>>> <usePluginRegistry/>
>>> <offline/>
>>> <pluginGroups/>
>>> <servers>
>>>   <server>
>>>     <id>snapshots</id>
>>>     <username>username4chris</username>
>>>     <password>{xxxxencyptedpasswordxxxx=}</password>
>>>   </server>
>>> </servers>
>>> <mirrors/>
>>> <proxies/>
>>> <profiles/>
>>> <activeProfiles/>
>>> </settings>
>> 
>> You might try the plaintext password in here first to make sure that's
>> working right, then try the encrypted one.
>> 
>>> 
>>> 3.  My pom.xml file has the distribution management set correctly I'm
>>> presuming otherwise the mvn deploy output would be going to the wrong
>> url.
>> 
>> Make sure the ID is "snapshots" to map to above.
>> 
>> - Brett
>> 
>> --
>> Brett Porter
>> brett@apache.org
>> http://brettporter.wordpress.com/
>> http://au.linkedin.com/in/brettporter
>> 
>> 
>> 
>> 
>> 

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





Re: Authorization Denied for archiva-read-repository permission from maven

Posted by Chris Mylonas <ch...@opencsta.org>.
Ah ha!
Yep it's a typo - pg 61 of the Packt book (pg 78 in PDF form) has
.m2/conf/settings.xml

So it deploys now... no need to use plain text password.

Thanks for that, and apart from the typo, excellent book Brett.  I've
skimmed the whole lot and now slowly working my way through it - I'm moving
my development from a bunch of ant scripts and manual moving of jar
dependencies to maven - I'm looking forward to moving the opencsta project
into the 21st century (and new website)!

Cheers from Sydney
Chris

On Thu, Feb 10, 2011 at 12:33 AM, Brett Porter <br...@apache.org> wrote:

>
>
> On 09/02/2011, at 5:30 PM, Chris Mylonas wrote:
>
> > 2.  I've set my user password in the ~/.m2/conf/settings.xml file like so
>
> Is this a typo? It should be ~/.m2/settings.xml. You can use mvn
> help:effective-settings to confirm.
>
> >
> > <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">
> >  <localRepository/>
> >  <interactiveMode/>
> >  <usePluginRegistry/>
> >  <offline/>
> >  <pluginGroups/>
> >  <servers>
> >    <server>
> >      <id>snapshots</id>
> >      <username>username4chris</username>
> >      <password>{xxxxencyptedpasswordxxxx=}</password>
> >    </server>
> >  </servers>
> >  <mirrors/>
> >  <proxies/>
> >  <profiles/>
> >  <activeProfiles/>
> > </settings>
>
> You might try the plaintext password in here first to make sure that's
> working right, then try the encrypted one.
>
> >
> > 3.  My pom.xml file has the distribution management set correctly I'm
> > presuming otherwise the mvn deploy output would be going to the wrong
> url.
>
> Make sure the ID is "snapshots" to map to above.
>
> - Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
>
>
>
>
>

Re: Authorization Denied for archiva-read-repository permission from maven

Posted by Brett Porter <br...@apache.org>.

On 09/02/2011, at 5:30 PM, Chris Mylonas wrote:

> 2.  I've set my user password in the ~/.m2/conf/settings.xml file like so

Is this a typo? It should be ~/.m2/settings.xml. You can use mvn help:effective-settings to confirm.

> 
> <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">
>  <localRepository/>
>  <interactiveMode/>
>  <usePluginRegistry/>
>  <offline/>
>  <pluginGroups/>
>  <servers>
>    <server>
>      <id>snapshots</id>
>      <username>username4chris</username>
>      <password>{xxxxencyptedpasswordxxxx=}</password>
>    </server>
>  </servers>
>  <mirrors/>
>  <proxies/>
>  <profiles/>
>  <activeProfiles/>
> </settings>

You might try the plaintext password in here first to make sure that's working right, then try the encrypted one.

> 
> 3.  My pom.xml file has the distribution management set correctly I'm
> presuming otherwise the mvn deploy output would be going to the wrong url.

Make sure the ID is "snapshots" to map to above.

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter