How do I fix certificate errors when running wget on an HTTPS URL in Cygwin Windows?
If you don't care about checking the validity of the certificate just add the --no-check-certificate
option on the wget
command-line.
Edit:
Not checking the validity of the certificate opens you up to man-in-the-middle attacks (MiTM). Depending on the environment you're working in (over the Internet vs. a private LAN) this could be a major vulnerability. Your situation and risk profile should inform your decision.
If you do actually care about checking the validity of the certificate you should provide wget
with a CA certificate "bundle". Cygwin provides this in the "ca-certificates" package. You can find more specific details in this Stack Overflow answer. It looks like there has been little consensus as to the location of the SSL certificate bundle for Cygwin in the past, resulting in the need to specify its location in configuration files or create symlinks to direct applications to the appropriate directory. Your mileage will vary depending on the version of Cygwin tools you're using.