curl --netrc https://example.com/protectedUseful for automation when credentials should not appear directly in shell history.
Authentication, cookies, TLS verification, client certs, pinned keys, and proxy-secured curl workflows.
Basic auth, netrc, bearer tokens, cookies, and session persistence.
curl --netrc https://example.com/protectedUseful for automation when credentials should not appear directly in shell history.
curl --netrc-file ./my.netrc https://example.com/protectedLets you isolate credentials per environment.
curl --digest -u 'user:password' https://example.com/protectedSome older systems still use Digest auth.
Use Negotiate auth with credentials from the environment or Kerberos setup.
curl --negotiate -u : https://example.com/protectedOften used in enterprise SSO environments.
curl --anyauth -u 'user:password' https://example.com/protectedConvenient when you do not know the server's auth scheme ahead of time.
Follow redirects and keep auth across hosts only when you explicitly trust it.
curl -L --location-trusted -u 'user:password' https://example.com/startBe careful: this can forward credentials after redirects.
TLS versions, CA stores, pinned keys, and client certificates.
curl --tlsv1.2 https://example.comUseful when testing compatibility or enforcing modern TLS.
curl --tls-max 1.3 https://example.comHelpful for compatibility testing.
curl --capath /etc/ssl/certs https://example.comSome systems prefer hashed CA certificate directories.
curl --cert client.p12:mypassword --cert-type P12 https://mtls.example.comCommon in enterprise and legacy integrations.
curl --pinnedpubkey sha256//BASE64HASH https://example.comPinning is useful for high-trust integrations and internal systems.
curl --crlfile revoked.pem https://example.comRelevant in stricter PKI environments.
Require certificate status validation via TLS stapling when supported.
curl --cert-status https://example.comUseful when validating OCSP-stapled environments.
Disable certificate verification for the HTTPS proxy connection.
curl --proxy-insecure -x https://proxy.example.com:8443 https://example.comProxy TLS and origin TLS are separate validation layers.
Proxy auth, HTTPS proxies, proxy certificates, and CONNECT tunnels.
curl -x http://proxy.example.com:8080 -U 'user:password' https://example.comUse `-U` / `--proxy-user` for proxy credentials.
curl -x https://proxy.example.com:8443 https://example.comAn HTTPS proxy encrypts the hop to the proxy itself.
curl --proxy-cacert proxy-ca.pem -x https://proxy.example.com:8443 https://example.comOrigin CA settings and proxy CA settings are independent.
curl --proxy-cert proxy-client.crt --proxy-key proxy-client.key -x https://proxy.example.com:8443 https://example.comUseful in locked-down corporate environments.
curl --proxytunnel -x http://proxy.example.com:8080 ftp://example.com/file.txtCONNECT tunnels are not limited to HTTPS workflows.