I’ve been trying to use private repos as Hugo Modules but failed.
I think the first step I need to figure out is to write the proper hugo mod get path which includes username/password or token
Then use its base as proxy setting and eventually HUGO_MODULE_PROXY on my CI and maybe change the module config import paths to only include what should be “appended” to the proxy…
But I was not able to write the correct path.
hugo mod get https://{username}:{token}@github.com/regisphilibert/mod-content-test
Yes so most of what I had previously found was about editing your git config to use https which is fine for my local machine, but not sure how Netlify and other CI will handle…
I will start by setting this up on local, and then worry about the CI.
Proxy is not the road you want to take. I can see that at as a great option if you want to host “an enterprise in house proxy for your modules”, but using a public proxy for your private repos …
I think Netlify is actually using SSH keys to authenticate to GitHub (they add their keys to your account), so I suspect that should just work.
This works seamlessly for me on my … MacBook. I have little (or: none) experience with this on Netlify etc., but I assume that will work there, too, assuming the Netlify git user has access to the repos in question.