Deploy token values not being passed down from group level?

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:

Hi @Arimil

Support for Group Deploy Token for this use-case is only available since 15.1. Please check version of your GitLab server or always write in the question if you are using GitLab.com.

Ah that would explain it, we’re on 13, oddly enough it’s still in the gitlab 13 docs here:

Where it mentions that it was implemented in 10.8, I did miss the bit where it mentions not being implemented for group-level tokens though.