Git not finding the CAFile

I’m having some trouble “getting” hugo modules with hugo mod get. I get the following error when I run the command:

WARN 2022/04/21 21:33:07 module "" not found; either add it as a Hugo Module or store it in "~/mwe/themes".: module does not exist
go get: module git ls-remote -q origin in /tmp/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/4968d1f02cc0835e7aa4357b7bc0db3f5c9e9f741eb4e2a9a0fd4e026d7f1cd1: exit status 128:
	fatal: unable to access '': server certificate verification failed. CAfile: none CRLfile: none

As a minimal (not) working example I created a new site with only this in the config.toml:

    path = ""

I have the git option http.sslCAInfo set through environment variable (GIT_SSL_INFO), but I have also tried setting it in my git configuration to no avail.

Both running go get and running git ls-remote -q origin in the tmp directory work fine, so I suspect Hugo as the culprit.

Let’s see if an environment variable is being blocked. In your site configuration:

  osEnv = ['.*']

Well that did the trick. Thank you for your speedy assistance!

1 Like

You’re welcome. It would be helpful if we could determine which environment variables were blocked.

The default list is:


Would you mind trying this?


Or this?

1 Like

Both of those alternatives work for me. My XDG_CONFIG_HOME is set to $HOME/.config, so that’s probably why.


Thanks for the update. Much appreciated.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.