Error parsing HTTP 404 response body: invalid character '<' looking for beginning of value - gitlab registry

198 Views Asked by At

I've a self-managed Gitlab EE (v16.6) instance upon which I've activated the Container registry, only the 80 and 443 ports are accessible on the host.
The gitlab nginx is made to automatically redirect to http to https.

I'm able to login to the registry as below:

docker login git.xxx.com -u gitlab-user -p gitlab-personal-token
WARNING! Your password will be stored unencrypted in /home/xxx/.docker/config.json.
Configure a credential helper to remove this warning.

However, when I try to push a build image either locally or through the CI pipeline I'm faced with the following error:

docker push git.xxx.com/username/test_project:commit_sha    
error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE html>\n<html>\n<head>\n ....

Below my current configuration:

external_url 'https://git.xxx.com'

registry_external_url 'https://git.xxx.com'
registry_nginx['redirect_http_to_https'] = true
registry_nginx['listen_https'] = true

nginx['enable'] = true
nginx['client_max_body_size'] = '250m'
nginx['redirect_http_to_https'] = true
# nginx['redirect_http_to_https_port'] = 80

letsencrypt['enable'] = true

gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "git.xxx.com"

I've checked the following ressource but I'm still getting and the same error:

Am surely missing a detail.

0

There are 0 best solutions below