Error response from daemon: Get "https://192.168.26.56/v2/": dial tcp 192.168.26.56:443: connect: connection refused 解决

 

安装本地仓库,harbor 登录报这个错,

嗯,我的问题是daemon.json、的问题。修改之后没有重启docker

 

┌──[root@liruilongs.github.io]-[~/docker]
└─$ docker login 192.168.26.56
Username: admin
Password:
Error: Password Required
┌──[root@liruilongs.github.io]-[~/docker]
└─$ docker login 192.168.26.56
Username: admin
Password:
Error response from daemon: Get "https://192.168.26.56/v2/": dial tcp 192.168.26.56:443: connect: connection refused
┌──[root@liruilongs.github.io]-[~/docker]
└─$ systemctl  daemon-reload
┌──[root@liruilongs.github.io]-[~/docker]
└─$ systemctl restart docker
┌──[root@liruilongs.github.io]-[~/docker]
└─$ docker login 192.168.26.56
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
┌──[root@liruilongs.github.io]-[~/docker]
└─$
┌──[root@liruilongs.github.io]-[~/docker]
└─$ cat /etc/docker/daemon.json
{
  "registry-mirrors": ["https://2tefyfv7.mirror.aliyuncs.com"],
  "insecure-registries": ["192.168.26.56"]
}
┌──[root@liruilongs.github.io]-[~/docker]
└─$

 

posted @ 2021-10-06 18:37  山河已无恙  阅读(3004)  评论(0编辑  收藏  举报