archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomorrow <austin17...@gmail.com>
Subject Archiva with gradle
Date Sun, 06 Nov 2011 18:11:37 GMT

Hi,
I'm trying to use archiva with gradle, I am adding below credentials in
build.gradle 

org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Repository
Archiva Managed internal", "http://server/archiva/repository/internal/",
"user", "password");
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Repository
Archiva Managed snapshots", "http://server/archiva/repository/snapshots/",
"user", "password");

repositories {
	mavenRepo urls:[
		"http://server/archiva/repository/internal",
		"http://server/archiva/repository/snapshots"
	]
}

This user has below roles:
    Global Repository Manager
    User Administrator
    System Administrator
    Repository Observer - snapshots
    Repository Observer - internal
    Global Repository Observer
    Repository Manager - snapshots
    Repository Manager - internal


Archiva request log:
XXX.XXX.XXX.XXX - - [06/Nov/2011:17:40:51 +0000] "HEAD
/archiva/repository/snapshots/javax/mail/mail/1.4.4/mail-1.4.4.jar HTTP/1.1"
401 0 "-" "Wharf Ivy/2.2.0"

Archiva log:
2011-11-06 11:40:51,602 [btpool0-8] INFO
org.apache.maven.archiva.security.ArchivaServletAuthenticator -
Authorization Denied
[ip=XXX.XXX.XXX.XXX,permission=archiva-read-repository,repo=internal] : no
matching permissions
2011-11-06 11:40:51,607 [btpool0-8] INFO
org.apache.maven.archiva.security.ArchivaServletAuthenticator -
Authorization Denied
[ip=XXX.XXX.XXX.XXX,permission=archiva-read-repository,repo=snapshots] : no
matching permissions


Gradle debug log

10:55:29.225 [DEBUG]
[org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] try to get
credentials for: Repository Archiva Managed internal Repository@server
10:55:29.225 [DEBUG]
[org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
authentication: k='Repository Archiva Managed internal Repository@server'
c='null'
10:55:29.241 [DEBUG]
[org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] HTTP
response status: 401
url=http://server/archiva/repository/internal/javax/mail/mail/1.4.4/mail-1.4.4.jar
[^]
10:55:29.242 [DEBUG]
[org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] CLIENT
ERROR: Unauthorized
url=http://server/archiva/repository/internal/javax/mail/mail/1.4.4/mail-1.4.4.jar
[^]

Is my realm name wrong? Not sure why this is not working?
-- 
View this message in context: http://old.nabble.com/Archiva-with-gradle-tp32788691p32788691.html
Sent from the archiva-users mailing list archive at Nabble.com.


Mime
View raw message