Netlify and Hugo Modules with private repo (fatal: could not read Username for ''

I have 2 private repos: 1 for my theme and 1 for my site. I’m calling the theme like this:


If is a public repo then I can deploy without any issues (on Netlify), but if it’s a private repo then the build fails because it cannot read username (have already given Netlify access to both repos).

I’d really appreciate help finding a solution to this… I would also be happy to deploy as Cloudflare Worker Pages if somebody knows how to do that with 2 private repos (hugo site + hugo theme module).

I’ve tried using git submodules in the past and it was a disaster, so I’d like to avoid it if possible… especially because I don’t plan to make site-specific changes to the theme repo.

please help me I am still a beginner, and trying to find tutorials related to this problem is still very minimal

my question: is there a way to connect hugo with tinacms but can also connect with github and cloudflare pages which in the end I can publish static web hugo with a subdomain address provided by cloudflare pages or github.