wget does not use option in .wgetrc

754 Views Asked by At

I'm trying to specify a specific CA file for use with a proxy. When I use wget --ca-certificate=file.cer, it works fine. But when I try to put ca_certificate = file.cer in $HOME/.wgetrc, it doesn't work and I get the following error:

Unable to locally verify the issuer's authority.

The docs say that these should both do the same thing, so I don't know what is causing the difference.

I'm on SLES 15 SP1 and using GNU Wget 1.20.3.

1

There are 1 best solutions below

0
Daweo On

According to Wgetrc Location manual

If the environmental variable WGETRC is set, Wget will try to load that file. Failing that, no further attempts will be made.

If WGETRC is not set, Wget will try to load $HOME/.wgetrc.

So first thing to check is if WGETRC is set. If it is and is other than $HOME/.wgetrc then wget will not load latter.

what is causing the difference.

I am not sure in relation to what is wget looking for files, so I would try using absolute path rather than relative.