前言
搭建的 harbor
仓库为 http
协议,在本地登录时出现如下报错:
docker login http://192.168.xx.xx
Username: admin
Password:
Error response from daemon: Get "https://192.168.xx.xx/v2/": dialing 192.168.xx.xx:443 matches static system exclude: connecting to 192.168.xx.xx:443: dial tcp 192.168.xx.xx:443: connect: connection refused
docker login http://192.168.xx.xx:80
Username: admin
Password:
Error response from daemon: Get "https://192.168.xx.xx:80/v2/": http: server gave HTTP response to HTTPS client
解决方法
修改 /etc/docker/daemon.json
,添加 "insecure-registries"
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"insecure-registries": ["http://192.168.xx.xx:80"], // 新增这一行
"registry-mirrors": [
"https://1nj0zren.mirror.aliyuncs.com",
"https://docker.mirrors.ustc.edu.cn",
"http://f1361db2.m.daocloud.io",
"https://registry.docker-cn.com"
]
}
再次尝试登录文章来源:https://www.toymoban.com/news/detail-703889.html
docker login http://192.168.xx.xx:80
Username: admin
Password:
Login Succeeded
登录成功!文章来源地址https://www.toymoban.com/news/detail-703889.html
到了这里,关于docker login harbor http login登录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!