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
相关推荐
x861 天前
WSL 里的 node 不是你装的那个
wsl
玖石书5 天前
WSL升级到2代并设置默认版本
wsl
youngerwang5 天前
【WSL2 VHDX 文件格式深度研究报告(开发 + 性能优化向)】
性能优化·wsl·vhdx·文件格式解析
玖石书5 天前
WSL2 手动安装 Ubuntu 24.04 到指定磁盘位置
linux·运维·ubuntu·wsl
DAVIED919 天前
llama.cpp 本地部署完全指南
windows·llama·wsl·llamacpp
深念Y20 天前
Windows → WSL2 全面迁移:工具链、Docker、OpenCode
linux·运维·windows·docker·容器·环境·wsl
x861 个月前
在 WSL 里把 Vulkan 跑起来
wsl·vulkan
Better Bench1 个月前
WSL2 Ubuntu 中 Claude CLI “command not found” 故障排查与修复
linux·ubuntu·claude·wsl·claudecode
取谖慕12.1 个月前
Harbor仓库从讲解到部署实战
docker·harbor
圣殿骑士-Khtangc1 个月前
WSL2 + Redis Stack 完整部署教程(Windows 11)
windows·redis·wsl