When doing microservices, I was about to deploy the compiled jar package to my Harbor repository, but I couldn’t log in, and the following error was reported.
[root@k8s-master ~]# docker login 192.168.30.24
Username: admin
Password:
Error response from daemon: Get https://192.168.30.24/v2/: dial tcp 192.168.30.24:443: connect: connection refused
Here it says connection refused, because I am using http deployment of harbor, here is https://进行访问的, all appear to report an error
Then the solution to this problem is actually in the /etc/docker/daemon.json file
Add the authentication to the private repository and you can login
[root@k8s-master ~]# vim /etc/docker/daemon.json
{
“registry-mirrors”: [“http://f1361db2.m.daocloud.io”],
“insecure-registries”: [“192.168.30.24”]
}
Restart docker
[root@k8s-master ~]# systemctl restart docker
Login, it says you are already logged in, on another host. ok, problem solved
[root@k8s-master ~]# docker login 192.168.30.24
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
Similar Posts:
- docker pull Error: Get https://hub.xxx.com/v1/_ping: dial tcp 192.168.1.8:443: getsockopt: connection refused
- Harbor 443 connect connection refused [How to Solve]
- Docker login harbor 403 Forbidden [How to Solve]
- Rabbitmq simple configuration and oserror: [errno 9] bad file descriptor problem
- [Solved] http: server gave HTTP response to HTTPS client
- When Docker installs an Mirror: failed to get default registry endpoint from daemon
- Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]
- An error is reported when the docker command is executed in Jenkins
- [Solved] kubeadm join 192.168.50.66:6443 –token 0109we.c3a3ofn0y0lmp0w9 –discovery-token-ca-cert-hash sha256:262f5eefdbeba51e6875cba5ed6e34061ad679f8a21f6e295d9fbd5ef05757e4
- docker unauthorized: incorrect username or password