I have to execute a command which executes a few other set of commands automatically. One of those commands is:
curl -k https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
But I want this command to run with an --insecure
flag so that the verification of curl's certificate doesn't take place as I'm behind a corporate proxy.
I understand that I need to edit the .curlrc
file to add the --insecure
option.
I checked my $HOME directory, and such a file doesn't exist. Should a create a new .curlrc file? What should be its content to start with? How does a sample .curlrc file look like? What all are its contents?
I found this link: Sample .curlrc file. However, this doesn't explain things clearly.
I found that you can just create the $HOME/.curlrc file yourself and it can just contain the -k
or --insecure
flag without anything else in the file. I have to do this programmatically, so I run this line of code before running the curls:
echo "-k" > ~/.curlrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With