docker login harbor http login登录

前言

搭建的 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

登录成功!

posted @   牛奔  阅读(250)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2020-09-04 一篇文章,教你学会Git
2020-09-04 hotmail 获取邮箱授权码
2020-09-04 php 配置Gmail 发送邮件 PHPMailer
2019-09-04 Laravel 中使用 Laravel-Excel 美化
2019-09-04 Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)
2019-09-04 使用 Laravel-Excel 和流的方法导出 Excel
2019-09-04 Laravel-admin 消息提醒、播放音频、点击跳转
点击右上角即可分享
微信分享提示