Hi guys, I’m trying to use a deploy token to push up maven packages to the package registry.
I have my repository setup like so:
repositories {
maven {
name = "gitlab-maven"
val apiUrl = System.getenv("CI_API_V4_URL")
val projectId = System.getenv("CI_PROJECT_ID")
url = uri("$apiUrl/projects/$projectId/packages/maven")
// CI
credentials(HttpHeaderCredentials::class) {
name = "Deploy-Token"
value = System.getenv("CI_DEPLOY_PASSWORD")
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
However it seems CI_DEPLOY_PASSWORD
is not being set, I’ve tested this by printing the value:
println("CI Deploy: " + System.getenv("CI_DEPLOY_PASSWORD"))
Which will output:
CI Deploy: null
However at the group level the group token was made so I’m not sure why it’s inaccessible: