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
相关推荐
fanruitian5 天前
使用harbor搭建私有仓库
k8s·harbor
虚神界熊孩儿7 天前
Linux下修改docker和harbor默认网段的方法
linux·docker·harbor
Android小码家12 天前
WSL+llama+CPU本地模型部署
llama·wsl·模型
liulilittle14 天前
Windows WSL部署Ubuntu子系统到其它磁盘上
linux·运维·服务器·网络·windows·ubuntu·wsl
jessezappy14 天前
记录:老电脑安装 Docker 4.40 不支持 WSL 2 时这样处理
docker·容器·wsl·硬件不支持·i5-3470
胡斌附体15 天前
wsl无法使用window代理访问ssh的问题处理
ssh·wsl·代理·密钥·ssh代理
特立独行的猫a20 天前
Windows10下使用WSL安装 Docker和docker compose完整教程
运维·windows·docker·容器·wsl
Irene199121 天前
实用篇:vsCode 中连接 WSL 并快速开始一个 Vue3 新项目
git·vscode·vue·wsl
TracyCoder12322 天前
在WSL中构建基本的大模型开发环境
linux·ubuntu·大模型·wsl·miniconda·jupiter