You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Nord, James" <JN...@nds.com> on 2012/08/23 12:38:02 UTC

Maven 3 deployment authentication

Hi all,

In Maven 3.0.4 and am seeing the following error when I try to release a project.


    [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ rpm-maven-plugin ---

    Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.jar

    Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.pom

    Aug 23, 2012 10:40:47 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector handleResponse

    WARNING: Authentication error: basic authorization challenge expected, but not found

    [INFO] ------------------------------------------------------------------------

    [INFO] BUILD FAILURE

    Aug 23, 2012 10:40:47 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector handleResponse

    WARNING: Authentication error: basic authorization challenge expected, but not found

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time: 42.591s

    [INFO] Finished at: Thu Aug 23 10:40:47 BST 2012

    [INFO] Final Memory: 22M/602M

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project rpm-maven-plugin: Failed to deploy artifacts: Could not transfer artifact org.codehaus.mojo:rpm-maven-plugin:jar:2.1-alpha-2_NDS1 from/to My Repository (http://myrepo/service/local/staging/deploy/maven2/): Failed to transfer file: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.jar. Return code is: 401, ReasonPhrase:Unauthorized. -> [Help 1]


What I find strange is the reason for the failure is it didn't have an authorization challenge - yet the response code was 401 (un-authorised).

Anyone any ideas / workarounds?

Regards,

/James

________________________________


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

RE: Maven 3 deployment authentication

Posted by "Nord, James" <JN...@nds.com>.
> -----Original Message-----
> From: Thomas Broyer [mailto:t.broyer@gmail.com]
> Sent: 23 August 2012 15:44
> To: Maven Users List
> Subject: Re: Maven 3 deployment authentication
>
> On Thu, Aug 23, 2012 at 4:30 PM, Thomas Scheffler <thomas.scheffler@uni-
> jena.de> wrote:
> > Am 23.08.2012 12:38, schrieb Nord, James:
> >> Hi all,
> >>
> >> In Maven 3.0.4 and am seeing the following error when I try to release a
> project.
> >>
> >>
> >>     [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @
> >> rpm-maven-plugin ---
> >>
> >>     Uploading:
> >> http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/r
> >> pm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-
> 2_NDS1.ja
> >> r
> >>
> >>     Uploading:
> >> http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/r
> >> pm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-
> 2_NDS1.po
> >> m
> >>
> >>     Aug 23, 2012 10:40:47 AM
> >> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR
> >> equestDirector handleResponse
> >>
> >>     WARNING: Authentication error: basic authorization challenge
> >> expected, but not found
> >
> > Hi,
> >
> > usually one would not allow basic authentication over unencrypted
> > channels like http. This provides no security and every hop in the
> > internet can gather login and passwords really simple.
> >
> > So probably you just change the "http:" to "https:" - if the server is
> > well configured or speak to the administrator of the repository on how
> > to transmit artifacts there.
>
> That's not the issue, as someone else has been having this same error with an
> https:// URL:
> http://java.net/jira/browse/MAVEN2_REPOSITORY-119
>
> Are the username and password configured in settings.xml for the
> distributionManagement server?
> http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

I found the cause,
The user (which was configured in settings.xml correctly and serverIds matched) didn’t have sufficient access to the nexus staging area for this specific groupid.

Giving the user access for this groupid solves the issue, but this was a strange failure - I would have exected a 403..

(BTW - for the security paranoid I'm not sending plaintext passwords on the internet)

Thanks

/James

________________________________


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

Re: Maven 3 deployment authentication

Posted by Thomas Broyer <t....@gmail.com>.
On Thu, Aug 23, 2012 at 4:30 PM, Thomas Scheffler
<th...@uni-jena.de> wrote:
> Am 23.08.2012 12:38, schrieb Nord, James:
>> Hi all,
>>
>> In Maven 3.0.4 and am seeing the following error when I try to release a project.
>>
>>
>>     [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ rpm-maven-plugin ---
>>
>>     Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.jar
>>
>>     Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.pom
>>
>>     Aug 23, 2012 10:40:47 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector handleResponse
>>
>>     WARNING: Authentication error: basic authorization challenge expected, but not found
>
> Hi,
>
> usually one would not allow basic authentication over unencrypted
> channels like http. This provides no security and every hop in the
> internet can gather login and passwords really simple.
>
> So probably you just change the "http:" to "https:" - if the server is
> well configured or speak to the administrator of the repository on how
> to transmit artifacts there.

That's not the issue, as someone else has been having this same error
with an https:// URL:
http://java.net/jira/browse/MAVEN2_REPOSITORY-119

Are the username and password configured in settings.xml for the
distributionManagement server?
http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 3 deployment authentication

Posted by Thomas Scheffler <th...@uni-jena.de>.
Am 23.08.2012 12:38, schrieb Nord, James:
> Hi all,
> 
> In Maven 3.0.4 and am seeing the following error when I try to release a project.
> 
> 
>     [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ rpm-maven-plugin ---
> 
>     Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.jar
> 
>     Uploading: http://myrepo/service/local/staging/deploy/maven2/org/codehaus/mojo/rpm-maven-plugin/2.1-alpha-2_NDS1/rpm-maven-plugin-2.1-alpha-2_NDS1.pom
> 
>     Aug 23, 2012 10:40:47 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector handleResponse
> 
>     WARNING: Authentication error: basic authorization challenge expected, but not found

Hi,

usually one would not allow basic authentication over unencrypted
channels like http. This provides no security and every hop in the
internet can gather login and passwords really simple.

So probably you just change the "http:" to "https:" - if the server is
well configured or speak to the administrator of the repository on how
to transmit artifacts there.

regards,

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org