GitLab.com registry will not let me push

I have been trying to push a docker image to my free tier private repo’s registry. Every time I do so, it errors.

$ docker logout registry.gitlab.com
Removing login credentials for registry.gitlab.com
$ docker login registry.gitlab.com 
Username: jerrac
Password: 
Login Succeeded

$ docker push registry.gitlab.com/jerrac/ramblingreagans:latest
The push refers to repository [registry.gitlab.com/jerrac/ramblingreagans]
ca8532de6f1b: Preparing 
2f14bd10ddba: Preparing 
8b1db49028b2: Preparing 
d32a5cad614e: Preparing 
85db5a6c0d7c: Preparing 
3c1590c020a9: Waiting 
fd1f98b0ad07: Waiting 
454f3db3b0b4: Waiting 
d875c3090128: Waiting 
7ae65cff806b: Waiting 
25ed02995e08: Waiting 
f0b63aff21d2: Waiting 
205d2181efe2: Waiting 
2316f0eaf41c: Waiting 
feaf9322a330: Waiting 
cef0a11c3a2d: Waiting 
a3f12714f703: Waiting 
8524e93276b9: Waiting 
27a3014a9bf3: Waiting 
3a1451052cc8: Waiting 
0a31e53a00cc: Waiting 
dd77af34a45a: Waiting 
39ec6d44a1c0: Waiting 
39c329662b7b: Waiting 
f53e2d80fb4f: Waiting 
4f6fafb5e818: Waiting 
420d00a649ab: Waiting 
afb4aa7e0a99: Waiting 
c3970b5dc6b1: Waiting 
03e5cb5a8bb0: Waiting 
4bcdffd70da2: Waiting 
denied: requested access to the resource is denied

My initial tries were via a gitlab-runner instance on my own vps. I also tried running it manually using the same token on my laptop. That’s what you see above.

I tried with, and without, the optional image name. As shown by the examples on the repo’s registry page.

I initially thought I might be running into space limitations. Finding an official list of the free tier’s limits seems impossible, but I did find a blog post from 2015 or so about GitLab increasing the limit to 10GB. I’m pretty sure all my private repo’s combined are less than 1GB.

Any ideas? Is there a way to get more output on what the docker push command is actually doing? (Just tried the -D flag, no extra output from it.)

I still have not found a solution.

My registry.gitlab.com/jerrac/ramblingreagans:latest image is 756MB. Another image I just tried, and failed, to push is 729MB.

The one project that I was able to push has an image that is ~93MB.

Is it actually a size issue? If so, where is that documented? Google did not find it when I looked.

Ok. Figured it out.

My api token permissions were wrong.

'read_registry" != ‘able to push’.

You need the ‘api’ permission as well.

HI
Can you please provide detail help on this? I am new and not able to understand where exactly change is required. I know I have created token with API Access

this is a very weird and cryptic answer, please detail your answer with more words.
you say api token permission and after that you need api permission. isn’t the same?

Hi,
I had the exact same problem when trying to push with a deploy token.
What solved it for me was that unintuitively I had to have write_registry + read_registry scope in order to be able to push.
write_registry scope alone in my deploy token would not work.

I’m still don’t understand…what should be the solution?

Can you explain it, how and where did you fixed it?