一. 背景
docker login 登录harbor镜像仓库报错.文章来源:https://www.toymoban.com/news/detail-681988.html
[root@master01 sloth]# docker login docker.harbor.master01.com
Username: bigdata
Password:
Error response from daemon: Get https://docker.harbor.master01.com/v2/: x509: certificate signed by unknown authority
[root@master01 sloth]#
二. 解决方式
- 修改docker配置文件, 将访问的镜像仓库地址加入到docker的
/etc/docker/daemon.json
配置中. 新增参数insecure-registries
.
[root@master01 sloth]# more /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"insecure-registries": ["docker.harbor.master01.com", "要忽略的image仓库请求地址"]
}
- 重启docker服务
systemctl restart docker文章来源地址https://www.toymoban.com/news/detail-681988.html
- 登录
[root@master01 sloth]# docker login docker.harbor.master01.com
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@master01 sloth]#
到了这里,关于docker login : x509: certificate signed by unknown authority的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!