Can't push to Registry

Greetings,

I have Gitlab CE deployed via the official docker container. I have an nginx reverse proxy in front of it with the following config for the location:

location / {
    set $dockerhost "gitlab";

    proxy_pass https://$dockerhost:4567;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header SSL_PROTOCOL $ssl_protocol;
}

If I try to push a new container to the registry, I end up with the following error:

$ docker push gitlab.example.com:4567/docker/mycontainer:latest
The push refers to repository [gitlab.example.com:4567/docker/mycontainer]
cd2160e88741: Retrying in 1 second
a3df62fa90b0: Retrying in 1 second
80caee66ece5: Retrying in 1 second
a79fe6dff072: Retrying in 1 second
87deea508850: Retrying in 1 second
90c4db1d5ef5: Waiting
cd7100a72410: Waiting
received unexpected HTTP status: 200 OK

If I try to pull a container from the registry, I get this error:

$ docker pull gitlab.example.com:4567/docker/myniftycontainer
Using default tag: latest
Error response from daemon: error unmarshalling content: unexpected end of JSON input

I’m at a loss as to the issue here. I can reach the main gitlab site with no problem, and I can log in/out via docker. I just can’t seem to push or pull a container. Clearly something isn’t set up right, I just don’t know what.

Thanks

Are there any GitLab logs generated that would provide information about the problem?

It doesn’t appear so, no. I was tailing the logs when I tried to push, and I see the hits in the nginx logs, but I don’t see anything else of substance. No errors.

Ok, after more digging, I think this is a proxy issue. No idea why it’s doing what it’s doing, but I don’t think it’s proxying the request to the back end properly. When I try to logout, I get an error that the credentials can’t be found. So I suspect that’s where my issue is.

Yup. That’s it. Nginx problem… Not sure why yet, though. Will post here if I can figure out the underlying issue.

proxy_redirect. That seemed to be my issue. It was off. Enabling it and setting it to default resolved the problem.