docker login harbor http login登录
  Y5KkHyxABkiu 2023年11月13日 34 0

前言

搭建的 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"
  ]
}

再次尝试登录

docker login http://192.168.xx.xx:80
Username: admin
Password:
Login Succeeded

登录成功!



【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月13日 0

暂无评论

推荐阅读
  tqf4faUYHHCA   2023年12月23日   99   0   0 sedpythonPythonsed
Y5KkHyxABkiu