Container Registry received unexpected HTTP status: 500 Internal Server Error

We have self managed instance of gitlab, enabled container registry by updating gitlab.rb file, with port 5050, it is an omnibus installation, and followed the instructions here

registry_external_url ‘https://xyz.com:5050

The certificates (key and crt files are at /etc/gitlab/ssl) When I use
docker login xyz.com:5050 I can login using my credentials as well as with username and PAS
But when I try to push image I get error received unexpected HTTP status: 500 Internal Server Error
Tried from windows and linux both machines with same result.

Any help appreciated

I experienced same error on my instance now. Im running docker version of gitlab ce 16.0

I found out in the logs that there were permission issues on the registry folders.

$ docker exec -it 72af1b1562ea ls -al /var/opt/gitlab/gitlab-rails/shared
total 56
drwxr-x--x 14 git      gitlab-www 4096 Feb 22  2022 .
drwxr-xr-x  9 git      root       4096 Jun 14 15:51 ..
drwx------ 19 git      git        4096 Jun 13 19:47 artifacts
drwx------  3 git      git        4096 Feb  8  2020 cache
drwx------  2 git      git        4096 Feb 22  2022 ci_secure_files
drwx------  2 git      git        4096 Jun 15  2019 dependency_proxy
drwx------  2 git      git        4096 Nov  9  2021 encrypted_settings
drwx------  2 git      git        4096 Jun 15  2019 external-diffs
drwx------  2 git      git        4096 Jun 15  2019 lfs-objects
drwx------  2 git      git        4096 Jun 15  2019 packages
drwxr-x---  3 git      gitlab-www 4096 Aug 29  2020 pages
drwxrwx---  3 registry git        4096 Jun 23  2019 registry
drwx------  2 git      git        4096 Jun  6  2020 terraform_state
drwx------  3 git      git        4096 Jun 23  2019 tmp

I did this docker exec -it 72af1b1562ea chown -R registry:registry /var/opt/gitlab/gitlab-rails/shared/registry and now the pipeline works again. This probably happened after some upgrade between versions.

1 Like

we haved the same problem here and solved it with you tip! thank you!