如何将cURL设置为始终使用-k选项? [英] How do I set cURL to always use the -k option?

查看:376
本文介绍了如何将cURL设置为始终使用-k选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,我的darwin / bash / evn变量版本不允许我在命令行中使用https进行任何操作,我不知道为什么,但是我已经尝试了一切。



但是我发现cURL(这是造成此问题的原因)可以采用-k选项或--insecure。

我可以只使用别名curl ='curl -k'吗?我从来没有使用别名来覆盖实际上存在的命令,甚至可以使用吗?

解决方案

别名命令通常不是问题。您还可以将 -k -不安全放入 $ HOME / .curlrc

 回声不安全>> $ HOME / .curlrc 


For some reason my version of darwin/bash/evn variables is not letting me co anything from the command line with https, I dunno why, but I have tried everything.

But I have found that cURL (the mean reason this is a problem for) can take a -k option or --insecure. This isn't great but its a hack that will work for now.

Could I just user alias curl='curl -k' ? I have never aliased something to overwrite a command that actually exists, will that even work?

解决方案

Aliasing commands is usually not a problem. You could also put -k or --insecure into $HOME/.curlrc:

echo insecure >> $HOME/.curlrc

这篇关于如何将cURL设置为始终使用-k选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆