Shell curl 命令报错:(60) SSL certificate problem: self signed certificate

  • curl 命令向服务器发送 https 请求
root@53c79d8a7095:~# curl --header "PRIVATE-TOKEN: Nf1kK4MeF4fPMo7d4jY2" https://172.16.0.168/api/v4/projects?search=xxxx
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.
  • 然后搜了一下,一开始以为是daijiguo的blog说的,需要设置参数,但实际上那应该是 PHP 相关的设置。
  • 然后继续 Google,找到了bytxlcurl需要加上-kwget需要加上--no-check-certificate
curl --header "PRIVATE-TOKEN: Nf1kK4MeF4fPMo7d4jY2" https://172.16.0.168/api/v4/projects?search=xxxx -k

wget 'https://172.16.0.168/api/v4/projects?search=xxxx -k' --no-check-certificate

结束语

  • 好记性不如烂键盘!希望可以加快大家解决问题的速度!
  • 14
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值