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
相关推荐
Qres82115 天前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl
weixin_ab16 天前
【WSL2 + PgVector 远程连接排坑记】
wsl
糖少主19 天前
WSL中使用Beyond Compare 3/4/5作为difftool
git·wsl·beyond compare·difftool
小哈里21 天前
【K8S】OCI标准下的企业级镜像治理:Harbor+Skopeo+Trivy 最佳实践
云原生·容器·kubernetes·harbor·镜像·skopen
Dontla22 天前
修改默认wsl发行版环境后报错(wsl --set-default)(wsl别名,$PROFILE)
wsl
勤奋的大熊猫23 天前
VS code 打开后自动提示 WSL 更新
wsl
likerhood24 天前
WSL 下安装 Miniconda 笔记
笔记·wsl
冲上云霄的Jayden24 天前
在 WSL 中安装 中文支持
乱码·wsl·中文支持
Dontla24 天前
Powershell打开wsl2 Ubuntu Nano无法粘贴内容解决方法(Use Ctrl+Shift+C/V as Copy/Paste)
wsl
zizle_lin25 天前
WSL初始化Ubuntu的使用
linux·运维·ubuntu·wsl