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
相关推荐
Irene199110 小时前
实用篇:vsCode 中连接 WSL 并快速开始一个 Vue3 新项目
git·vscode·vue·wsl
TracyCoder1231 天前
在WSL中构建基本的大模型开发环境
linux·ubuntu·大模型·wsl·miniconda·jupiter
winfreedoms2 天前
wsl ubuntu的基础配置
linux·ubuntu·wsl·基础配置
Lion Long2 天前
在 Windows 上快速搭建 VSCode 的 C++ 开发环境(基于 WSL)
linux·c++·windows·vscode·wsl
winfreedoms2 天前
微软商店安装的 WSL Ubuntu如何移动到其他目录下
ubuntu·microsoft·wsl
Android小码家3 天前
WSL 编译Android13+AVD环境搭建+WSL环境运行+Windows环境运行
wsl·虚拟机·android13·avd
咋吃都不胖lyh6 天前
小白教程:在Windows的WSL(Ubuntu)中手动部署one-api
wsl·oneapi
Sean_woo19988 天前
Zephyr rtos ESP32系列BSP提交流程指南
stm32·单片机·esp32·wsl·zephyr·立创开发板
野生yumeko10 天前
wsl使用git
git·ssh·wsl