本环境ca-certificates已安装
直接添加repo报错如下
# helm repo add minio https://helm.min.io/
Error: looks like "https://helm.min.io/" is not a valid chart repository or cannot be reached: Get "https://helm.min.io/index.yaml": x509: certificate is not valid for any names, but wanted to match helm.min.io
忽略tls依然报错
# helm repo add --insecure-skip-tls-verify minio https://helm.min.io/
Error: looks like "https://helm.min.io/" is not a valid chart repository or cannot be reached: failed to fetch https://helm.min.io/index.yaml : 400 Bad Request
使用wget下载报错
# wget https://helm.min.io/index.yaml
--2022-02-16 22:58:11-- https://helm.min.io/index.yaml
正在解析主机 helm.min.io (helm.min.io)... 185.199.109.153, 185.199.111.153, 185.199.108.153, ...
正在连接 helm.min.io (helm.min.io)|185.199.109.153|:443... 已连接。
错误: “helm.min.io” 的证书不可信。
错误: “helm.min.io” 的证书颁发者未知。
证书所有者与主机名 “helm.min.io” 不符
wget不检查cert依然报错
# wget --no-check-certificate https://helm.min.io/index.yaml
--2022-02-16 23:04:45-- https://helm.min.io/index.yaml
正在解析主机 helm.min.io (helm.min.io)... 185.199.108.153, 185.199.110.153, 185.199.109.153, ...
正在连接 helm.min.io (helm.min.io)|185.199.108.153|:443... 已连接。
警告: “helm.min.io” 的证书不可信。
警告: “helm.min.io” 的证书颁发者未知。
证书所有者与主机名 “helm.min.io” 不符
已发出 HTTP 请求,正在等待回应... 400 Bad Request
2022-02-16 23:04:45 错误 400:Bad Request。
使用curl报错
# curl -OL https://helm.min.io/index.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
使用curl指定-k下载无报错
# curl -OL https://helm.min.io/index.yaml -k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 345 100 345 0 0 1185 0 --:--:-- --:--:-- --:--:-- 1185
但是内容有问题
# cat index.yaml
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
</body>
</html>
临时解决方式
1. 在一个能执行helm repo add minio https://helm.min.io/的环境里执行如下命令,假设该主机ip为172.20.42.80
socat TCP4-LISTEN:443,fork TCP4:helm.min.io:443
在本机hosts里配上
172.20.42.80 helm.min.io
再执行helm repo add minio https://helm.min.io/成功
根本问题未解决,也希望有朋友能解答一下,感谢!!