Closed Minipada closed 10 months ago
Minimal .gitlab-ci.yml illustrating the issue
--- job: script: - 'REPOSITORIES=$(wget -O- -q --header "PRIVATE-TOKEN: $MY_TOKEN" "https://gitlab.com/api/v4/projects/ORG%2FPROJECT/registry/repositories")'
Expected behavior Be able to do the operation.
Unfortunately, it returns wget: server returned error: HTTP/1.1 404 Not Found. If i replace $MY_TOKEN by hardcoding the token itself, it works fine.
wget: server returned error: HTTP/1.1 404 Not Found
$MY_TOKEN
I also tried removing the single quotes:
--- job: script: - | REPOSITORIES=$(wget -O- -q --header "PRIVATE-TOKEN: $MY_TOKEN" "https://gitlab.com/api/v4/projects/ORG%2FPROJECT/registry/repositories")
But I get the same result
Host information Debian 12 (Bookworm) gitlab-ci-local 4.45.2
Containerd binary Using docker, container running based on docker:20.10.16
docker:20.10.16
Additional context
.gitlab-ci-local-env
PRIVILEGED=true ULIMIT=8000:16000 VOLUME=certs:/certs/client VARIABLE="DOCKER_TLS_CERTDIR=/certs"
Where do you specify the MY_TOKEN variable ?
MY_TOKEN
I'm sorry if I made you lose some time, I needed to add it to .gitlab-ci-local-variables.yml, then it worked fine. Thanks for the quick reply!
.gitlab-ci-local-variables.yml
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior Be able to do the operation.
Unfortunately, it returns
wget: server returned error: HTTP/1.1 404 Not Found
. If i replace$MY_TOKEN
by hardcoding the token itself, it works fine.I also tried removing the single quotes:
But I get the same result
Host information Debian 12 (Bookworm) gitlab-ci-local 4.45.2
Containerd binary Using docker, container running based on
docker:20.10.16
Additional context
.gitlab-ci-local-env