wsl登录harbor dial tcp: lookup xxx.xxx.xxx: no such host

root@thinkpade14r7:~/harbor# docker login registry.cluster.local

Username: admin

Password:

Error response from daemon: Get "https://registry.cluster.local/v2/": dialing registry.cluster.local:443 container via direct connection because has no HTTPS proxy: connecting to registry.cluster.local:443: dial tcp: lookup registry.cluster.local: no such host

在wsl的/etc/hosts中配置了域名解析,没用,要去windows的C:\Windows\System32\drivers\etc\hosts文件中配置才行,坑爹。

配好后把harbor的证书copy到wsl的docker域名配置里/etc/docker/certs.d/registry.cluster.local/ca.crt

bash 复制代码
root@thinkpade14r7:~/harbor# ls
LICENSE  certs  common  common.sh  data  docker-compose.yml  harbor.v2.13.0.tar.gz  harbor.yml  harbor.yml.tmpl  install.sh  prepare
root@thinkpade14r7:~/harbor# cp certs/
ca.crt             ca.key             ca.srl             cluster.local.crt  cluster.local.csr  cluster.local.key  v3.ext
root@thinkpade14r7:~/harbor# cp certs/cluster.local.crt  /etc/docker/certs.d/registry.cluster.local/ca.crt
相关推荐
x868 天前
在 WSL 里把 Vulkan 跑起来
wsl·vulkan
Better Bench16 天前
WSL2 Ubuntu 中 Claude CLI “command not found” 故障排查与修复
linux·ubuntu·claude·wsl·claudecode
取谖慕12.21 天前
Harbor仓库从讲解到部署实战
docker·harbor
圣殿骑士-Khtangc23 天前
WSL2 + Redis Stack 完整部署教程(Windows 11)
windows·redis·wsl
Imagine Miracle1 个月前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
zhou135284822671 个月前
Linux 系统安装 Ollama 详细教程
linux·ubuntu·wsl·ollama
西游音月1 个月前
Windows环境下的WSL+Claude Code安装配置
windows·大模型·ai编程·wsl·claude code
随风一样自由1 个月前
【WSL+Linux】国内网络连接微软官方服务器(或GitHub)不稳定,导致下载内核或Linux发行版时超时断开如何解决?
linux·服务器·wsl
假如梵高是飞行员1 个月前
WSL2 从 img 镜像文件启动特定 Linux 发行版完整指南
linux·windows·wsl
Qres8212 个月前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl