curl: (51) Unable to communicate securely with peer: requested domain name does not match the server

问题图:
在这里插入图片描述

问题原因:
该问题是由于无法与对等体安全通信,请求的域名与服务器的证书不匹配,可以理解为https证书加密的问题。

解决方法:
可以在curl后面加上相关参数,由于我们需要访问的是https的加密链接,需要加上:–insecure(或-k),
效果图如下:
在这里插入图片描述
关于curl更多的用法,可以通过curl --help知悉

猜你喜欢

转载自blog.csdn.net/weixin_48773672/article/details/128902402
今日推荐