Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker login won't work if we use a custom port (8443) - redirects to 443 #10

Open
ghost opened this issue Apr 5, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 5, 2019

This is what you get with a custom port (HTTPS):

CURL:
< HTTP/1.1 401 Unauthorized

< Server: nginx

< Date: Fri, 05 Apr 2019 13:29:45 GMT

< Content-Type: application/json; charset=utf-8

< Content-Length: 87

< Connection: keep-alive

< Docker-Distribution-Api-Version: registry/2.0

< Set-Cookie: sid=b9969f27808d09cd150a27e0122fc068; Path=/; HttpOnly

< Www-Authenticate: Bearer realm="https://DOMAIN.COM/service/token",service="harbor-registry"

<

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

* Connection #0 to host  DOMAIN.COM left intact

$ sudo docker login DOMAIN.COM8443

[sudo] password for user:

Username: user

Password:

Error response from daemon: Get https://DOMAIN.COM:8443/v2/: Get https://DOMAIN.COM/service/token?account=user&client_id=docker&offline_token=true&service=harbor-registry: dial tcp 192.168.x.x:443: connect: connection refused

I found what is wrong and will try to fix it.
./config/notary/server-config.postgres.json: "realm": "https://DOMAIN.COM/service/token"

@ghost
Copy link
Author

ghost commented May 27, 2019

See #11 for a fix. It still needs to be tested to know if it works for everyone's cases so we need help writing tests. For me it does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants