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.
这个报错可能是服务器时间不对,使用下面脚本同步一下系统时间(linux,centos操作系统)
#!/bin/bash
# 安装 NTP 软件包
sudo yum install -y ntp
# 编辑 NTP 配置文件
sudo tee /etc/ntp.conf > /dev/null <<EOT
server time.asia.apple.com iburst
EOT
# 设置系统时区为东八区
sudo timedatectl set-timezone Asia/Shanghai
# 设置系统时钟使用24小时制
sudo timedatectl set-local-rtc 1
# 同步时间并重启 NTP 服务
sudo ntpdate -u time.asia.apple.com
sudo systemctl restart ntpd
# 设置 NTP 服务开机自启动
sudo systemctl enable ntpd
# 显示当前时间
date