Behind the corporate proxy, the alert script fails with `curl: (60) SSL certificate problem: unable to get local issuer certificate`. Someone suggests adding `-k`.
IntermediateTroubleshootingTroubleshooting: tools, portability, permissions and environment
Answer
Likely causes → A TLS-inspecting proxy re-signs HTTPS traffic with the company's own CA, which is not in the host's trust store. Less often, the server sends an incomplete certificate chain. -k disables verification entirely, so the webhook URL (a secret) could be sent to anyone who intercepts the connection.
Diagnose →
curl -v https://hooks.slack.com 2>&1 | grep -E 'issuer|subject' # issuer is the corporate CA?
openssl s_client -connect hooks.slack.com:443 -showcerts </dev/null 2>/dev/null | grep -E 's:|i:'
env | grep -i _proxy
Fix → Trust the corporate CA system-wide, or point curl at a bundle:
sudo cp corp-root-ca.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates # Debian/Ubuntu
sudo cp corp-root-ca.crt /etc/pki/ca-trust/source/anchors/ && sudo update-ca-trust # RHEL family
curl --cacert /etc/opskit/corp-ca.pem ... # per-call
Prevent → Bake the CA into base images; fail CI on any curl -k/--insecure in scripts (grep -rnE 'curl .*(-k|--insecure)' scripts/).
More on Troubleshooting: tools, portability, permissions and environment
On a Mac, `sed -i 's/replicas: 2/replicas: 3/' deploy.yaml` fails with `sed: 1: "deploy.yaml": extra characters at the end of d command`.BeginnerA cleanup script fails on a developer's Mac with `date: illegal option -- d`.BeginnerA script that works on Ubuntu fails in an Alpine-based CI image with `grep: unrecognized option: P`.IntermediateAn `awk` one-liner works on your RHEL box but fails on Ubuntu with `awk: line 1: function gensub never defined`.Intermediate`comm -23 expected.txt installed.txt` prints `comm: file 1 is not in sorted order`, even though both files were produced with `sort`.Intermediate`grep ERROR /var/log/app/app.log` prints only `grep: /var/log/app/app.log: binary file matches`.Beginner