我正在使用 curl 终端并发出以下命令:-curl --anyauth --user admin:admin "https://localhost:8000/LATEST/search?q=caesar"
我得到以下警报:-
curl: (77) schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
请建议。我已经在 Windows 中安装了 curl,还下载了 .pem 文件并将其放在同一个文件夹中。
最佳答案
如果您的服务器有一个自签名证书,那么默认情况下 curl 不知道它可以相信服务器就是它所说的那个人,并且不想说话。
您可以:
-k
or --insecure
切换到忽略并继续。这对本地的发展可能很好。 关于ssl - 由不受信任的机构颁发的证书链,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61676185/