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:
- GitLab Container Registry Connection Error
- error parsing HTTP 404 response body: invalid character '<' looking for beginning of value docker
- 404 when executing docker push to gitlab-container-registry
- Gitlab Container Registry Docs
Am surely missing a detail.