折雨的天空

新浪微薄腾讯微薄

最新碎语:最近霉到了住。哎。。。

您的位置:折雨的天空 >其他技术> Harbor连接的时候使用Http报错:Error response from daemon: Get https://192.168.0.4/v2/: dial tcp 192.168.0.4: connect: no route to host

Harbor连接的时候使用Http报错:Error response from daemon: Get https://192.168.0.4/v2/: dial tcp 192.168.0.4: connect: no route to host

解决方法:

前提是你配置的Harbor支持http。

[#zeyu#]

1、执行:
find / -name docker.service -type f

2、vi /usr/lib/systemd/system/docker.service

#查找:ExecStart=/usr/bin/dockerd 在其后面添加 --insecure-registry=192.168.2.195 配置


#添加后变成:

ExecStart=/usr/bin/dockerd --insecure-registry=192.168.2.195


#这个IP根据你的Harbor的服务器IP来改变。

3、执行:systemctl daemon-reload

4、执行:systemctl restart docker

这个时候,就可以了。


以上操作执行步骤如下:


[root@localhost bin]# find / -name docker.service -type f
/usr/lib/systemd/system/docker.service
[root@localhost bin]# vi /usr/lib/systemd/system/docker.service
[root@localhost bin]# systemctl daemon-reload
[root@localhost bin]# systemctl restart docker
[root@localhost bin]# docker login 192.168.0.7

[/#zeyu#]

------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------

转载请注明本文标题和链接:《Harbor连接的时候使用Http报错:Error response from daemon: Get https://192.168.0.4/v2/: dial tcp 192.168.0.4: connect: no route to host

奖励一下

取消

分享不易,烦请有多多打赏,如您也困难,点击右边关闭即可!

扫码支持
扫码打赏,5元,10元,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

-秒后自动关闭,如已打赏,或者不愿打赏,请点击右上角关闭图标。

发表评论

路人甲 表情
看不清楚?点图切换