How can I resolve "server gave HTTP response to HTTPS client"

I have three server:
1 master: 192.168.1.131
1 node: 192.168.1.132
1 rancher: 192.168.1.133
I have create docker image (private registry docker) on node used 192.168.1.132:5000/test.
Both master and node pushed and pulled to image. But used rancher deploy set image 192.168.1.132:5000/test then error:
Failed to pull image “192.168.1.132:5000/test-demo”: rpc error: code = Unknown desc = failed to pull and unpack image “192.168.1.132:5000/test-demo:latest”: failed to resolve reference “192.168.1.132:5000/test-demo:latest”: failed to do request: Head “https://192.168.1.132:5000/v2/test-demo/manifests/latest”: http: server gave HTTP response to HTTPS client.

My image used
http not https. But rancher send https.

How can I resolve “server gave HTTP response to HTTPS client”

HTTPS Client Authentication is a more secure method of authentication than either basic or form-based authentication . It uses HTTP over SSL (HTTPS), in which the server authenticates the client using the client’s Public Key Certificate (PKC).

Hopefully this will help anyone having issues getting the insecure-registries fix to work.
Try below code.

Adding

{ "insecure-registries":["host:port"] }

to

/etc/docker/daemon.json

did not work for me until I created the file

/etc/default/docker

and put the line

DOCKER_OPTS="--config-file=/etc/docker/daemon.json"

in it and then restarted the docker daemon with

sudo systemctl stop docker and sudo systemctl start docker.

For some reason just doing a sudo systemctl restart docker did not work. It threw an error about trying to restart the service to quickly.

Also for ["host:port"] I used the IP of my Docker registry as opposed to the hostname as I did not have DNS or a hosts file setup to be able to find the registry by hostname.

This drove me absolutely nuts until I stumbled upon the /etc/default/docker bit here
I am new to Docker and so I don’t know if this is new requirement since this initial post was answered or if there was something else I missed when I first setup my registry. Though all I did was to follow the current docs on the Docker site itself.