Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

denied: requested access to the resource is denied

I wrote gitlab-ci.yml file. I Login to gitlab registry with this command

docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY

and in the next step build the docker image

docker build -t $REGISTRY .

But When i push docker image

docker push $REGISTRY

I get this error

denied: requested access to the resource is denied

How can fix this error?

like image 933
Mohammad Nikdouz Avatar asked Jan 21 '26 13:01

Mohammad Nikdouz


1 Answers

Gitlab is probably not finding any repository of the same name as the registry you're trying to push to.

For example if you do docker push gitlab.helloworld.com/prefix/repo-name, then you need to have a project prefix/repo-name

You can read about more about this issue here

like image 74
molamk Avatar answered Jan 23 '26 11:01

molamk