online
online

Reputation: 5527

Why can't login to harbor server form client at plain HTTP case?

Installed harbor on a host. Using plain HTTP protocol.

The IP is 192.168.33.10.

I can login it from harbor server itself:

sudo docker login 192.168.33.10

And can access it from browser:

http://192.168.33.10

But can't login it from other client(Mac, installed docker use it). The error message is:

docker login 192.168.33.10
Username: user1
Password: (my_password)
Error response from daemon: Get https://192.168.33.10/v2/: dial tcp 192.168.33.10:443: getsockopt: connection refused

From Harbor documentation there has this notice:

https://github.com/vmware/harbor/blob/master/docs/installation_guide.md

IMPORTANT: The default installation of Harbor uses HTTP - as such, you will need to add the option --insecure-registry to your client's Docker daemon and restart the Docker service.

Both the harbor host and client host set /etc/docker/daemon.json:

{ "insecure-registries":["192.168.33.10"] }

and restarted docker. However, it not works.

If don't setup harbor under HTTPS protocol now, is there a way to access it from client correctly?

Upvotes: 1

Views: 2435

Answers (1)

online
online

Reputation: 5527

Solution

It's unnecessary to set /etc/docker/daemon.json on client. Mac has another way:

enter image description here

Apply and Restart

Upvotes: 0

Related Questions