Pass "credentials" to "ivy" repository
I have private artifactory server and it has nodejs mirror and by default all request should be authorized.
If I set distBaseUrl to use artifactory and I always get "401 Unauthorized", because gradle-node-plugin ignores credentials field.
IMHO ivy repo should not add automatically and developer should do that manually.
node {
version = "4.1.2"
npmVersion = "2.14.4"
download = true
distBaseUrl = "https://localhost:8080/artifactory"
}
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://localhost:8080/artifactory/nodejs/v4.1.2/ivy.xml]
Resource missing. [HTTP GET: https://localhost:8080/artifactory/repo/org/nodejs/node/4.1.2/node-4.1.2.pom]
Resource missing. [HTTP HEAD: https://localhost:8080/artifactory/repo/org/nodejs/node/4.1.2/node-4.1.2-darwin-x64.tar.gz]
Hi. I will try to replicate this here locally.
@srs Thanks, I'm looking forward to get it done :)
@srs Also it ignores HTTP Basic Authentication credentials passed via url: https://user:password@localhost:8080/artifactory
I experienced the same problem. +1 for getting this done.
@srs : Any thoughts on when this might become available?
Add to build.gradle, works for me
project.repositories.whenObjectAdded {
if (it instanceof IvyArtifactRepository) {
it.authentication {
basic(BasicAuthentication)
}
it.credentials {
username "user"
password "pass"
}
}
}