How to fix curl: (60) SSL certificate: Invalid certificate chain when using sudo
f you store your CA certificates on the filesystem (in PEM format) you can tell curl to use them with

sudo curl --cacert /path/to/cacert.pem ...


You can also turn off the certificate verification with

sudo curl --insecure ...


Edit: Updated with regard to feedback

If you want to set this permanently, you should create a .curlrc files and place in your home directory. sudo commands may need this file in /var/root The file takes the same options as the command line but without the dashes. One option per line:

cacert=/path/to/my/certs.pem