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
相关推荐
Imagine Miracle8 天前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
zhou135284822679 天前
Linux 系统安装 Ollama 详细教程
linux·ubuntu·wsl·ollama
西游音月9 天前
Windows环境下的WSL+Claude Code安装配置
windows·大模型·ai编程·wsl·claude code
随风一样自由14 天前
【WSL+Linux】国内网络连接微软官方服务器(或GitHub)不稳定,导致下载内核或Linux发行版时超时断开如何解决?
linux·服务器·wsl
假如梵高是飞行员16 天前
WSL2 从 img 镜像文件启动特定 Linux 发行版完整指南
linux·windows·wsl
Qres8211 个月前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl
weixin_ab1 个月前
【WSL2 + PgVector 远程连接排坑记】
wsl
糖少主1 个月前
WSL中使用Beyond Compare 3/4/5作为difftool
git·wsl·beyond compare·difftool
小哈里1 个月前
【K8S】OCI标准下的企业级镜像治理:Harbor+Skopeo+Trivy 最佳实践
云原生·容器·kubernetes·harbor·镜像·skopen
Dontla1 个月前
修改默认wsl发行版环境后报错(wsl --set-default)(wsl别名,$PROFILE)
wsl