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
相关推荐
Meraki.Zhang2 天前
Win11 + WSL 完全配置指南:从零搭建 AI 编程环境
wsl·ai开发环境
Irene19915 天前
WSL 切换磁盘后验证完整性(MobaXterm、Powershell、WSL 的区别)
linux·wsl·mobaxterm
糖梨7 天前
Windows 下 Cursor 变量跳转的 WSL2 + clangd 方案 —— 跨平台 Linux C++ 开发环境搭建踩坑实录
c++·跨平台·wsl·clangd·cursor
lcreek8 天前
Kali Linux WSL 中文输入法完整安装指南
linux·wsl·中文输入法
lcreek8 天前
Kali Linux WSL 从零安装 XFCE4 桌面完整指南
linux·wsl
冲上云霄的Jayden9 天前
在 WSL 中安装 Google Chrome 浏览器
chrome·wsl
wj30558537812 天前
课程 1:WSL + uv + ComfyUI 环境选择说明
python·wsl·cuda·uv·comfyui
IceSugarJJ12 天前
Windows下VSCode+ WSL项目启动流程
linux·windows·vscode·ubuntu·wsl
chen_22713 天前
windows系统安装wsl
windows·wsl
小猪写代码14 天前
拓:论 WSL 和 VMware
wsl·虚拟机