Curl -> How to get passed an Error 60 downloading issue

https://www.pexels.com/photo/focus-photography-of-sea-waves-2127969/

If you’ve ever tried to download something with curl and hit this error:

curl: (60) SSL certificate problem: unable to get local issuer certificate

…it’s annoying. Especially when all you’re trying to do is grab a script or a file from GitHub.

What’s the deal with Error 60?

Basically, curl is trying to be helpful. It wants to make sure the site you’re hitting has a valid SSL certificate — and that your computer has the right authority files to trust it.

When it can’t verify the certificate, it throws that (60) error. This is usually a problem on your end — like missing CA certs, strict IT policies, or a fresh dev environment that doesn’t have everything set up yet.

The fix: just use -k

Here’s the quick and dirty solution:

curl -k https://github.com/user/repo/raw/main/some-script.sh -o some-script.sh

The -k flag (or — insecure) tells curl to skip SSL verification. It’s basically saying:

“Yeah yeah, I know this connection isn’t ‘verified.’ I’m fine with it. Just give me the file.”

For trusted sites like GitHub, this is usually fine — especially if you just need to get something quickly and your system is throwing a fit.

When is this actually useful?

  • You’re behind a corporate firewall or strict security setup
  • You’re on a fresh install or container with no CA certs yet
  • You know and trust the source (like GitHub) and just need to move fast

It’s not something you should throw into production scripts — but for dev work, prototyping, or debugging? It’s a lifesaver.

Pro tip: if you want a more permanent fix

Instead of bypassing SSL checks every time, you can install the certificate authorities your system is missing.

For macOS (via Homebrew):

brew install curl-ca-bundle

For Ubuntu/Debian:

sudo apt install ca-certificates

Once that’s done, curl will start trusting more secure sites by default — and you won’t have to reach for -k as often.

So yeah, -k is kind of like that friend who helps you climb the fence when the gate’s locked. Not always the cleanest solution, but it gets you where you need to go.

If you’ve got other tips or tricks for dealing with curl errors, drop ’em in the comments. Always down to learn more hacks.

Until Next Time!

Learn more Curl -> How to get passed an Error 60 downloading issue

Leave a Reply