Harbor docker push first path segment in URL cannot contain colon

14 views Asked by At

I have set up harbor behind an nginx reverse-proxy, and when I push docker images to it, I get this error

5bfe9e7b484e: Retrying in 1 second
b59ac5e5fd8f: Retrying in 1 second
3a69b46a1ce6: Retrying in 1 second
473959d9af57: Retrying in 1 second
fe56a5801ec1: Retrying in 1 second
1f34686be733: Waiting
691621f13fd5: Waiting
bf27900f6443: Waiting
01fd502f0720: Waiting
first path segment in URL cannot contain colon

What could be causing this error? There is no error in nginx or harbor ontainer. Thanks!

1

There are 1 answers

0
Redover On

I solved this issue by adding the following to my nginx config (the Host header is what made it work, the others are also needed).

proxy_set_header  Host              $http_host;
proxy_set_header  X-Real-IP         $remote_addr;
proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
proxy_set_header  X-Forwarded-Proto $scheme;