Does this still happen if you use a literal string to define the username
and password?
eg
maven {
    credentials {
        username "myusername"
        password "mypassword"
    }
    url repoUrl
}


On 23 December 2011 04:54, k4rn4k <[email protected]> wrote:

> Hello,
>
> I'm trying to add credentials to my https maven repo but I can't get them
> to
> work
>
> I've tried :
>
>        maven {
>
>
> org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Repository
> Archiva Managed plugins Repository", repoHost,user, pass);
>
>
> org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("Repository
> Archiva Managed plugins Repository", repoHost,user, pass);
>
>          url repoUrl
>        }
>
>
>        maven {
>            name "Nexus Repo"
>            credentials {
>              username user
>              password pass
>            }
>        url urlRepo
>        }
>
>
>  I always get the same output "No credentials available for BASIC
> 'Repository Archiva Managed plugins Repository'@archiva.company.com:443 "
>
>
> I've tried the next task also and even user and pass are not null all repo
> credentials return always null.
>
>
> task showCredentials << {
>
>    println "Using "+user+" "+pass
>
>    repositories.each{
>          println it.name
>          println it.getCredentials()
>          println it.getCredentials().getPassword()
>          println it.getCredentials().getUsername()
>   }
> }
>
>
> Output:
> :showCredentials
> Using 12 12
>
> maven
>
> org.gradle.api.internal.artifacts.repositories.DefaultPasswordCredentials_Decorated@16132c4
> null
> null
>
> Net Repo
>
> org.gradle.api.internal.artifacts.repositories.DefaultPasswordCredentials_Decorated@1b7d13e
> null
> null
>
> gradle -v:
> ------------------------------------------------------------
> Gradle 1.0-milestone-6
> ------------------------------------------------------------
>
> Gradle build time: jueves 17 de noviembre de 2011 05H54' UTC
> Groovy: 1.8.4
> Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
> Ivy: 2.2.0
> JVM: 1.6.0_18 (Sun Microsystems Inc. 16.0-b13)
> OS: Linux 2.6.31.14-0.4-desktop i386
>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/Maven-credentials-not-working-tp5097007p5097007.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
Darrell (Daz) DeBoer
Principal Engineer, Gradleware
http://www.gradleware.com

Reply via email to