I have a private Hugo theme repository on GitHub that multiple sites share which has been working well before recent updates.
So far I have been able to do this by replacing the git URL in my git config locally, along with running a script to do this on CloudCannon:
git config \
This has worked well up until v0.91.2. Now when I run
hugo mod get -u within my site directory I get the following error:
go get: module github.com/USER/THEME: git ls-remote -q origin in /var/folders/26/gqnv01_55p964v8yz39d51fw0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/235a1e682f371746744c788f5c36ac403a23b2815ffad84f6aa83fecb0af34e7: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/USER/THEME/' not found
Is this a bug or is there a better way to use private theme repositories now?
git remote -v tell you? If it’s a http-link, then switch your remote to SSH and authenticate Github with a key.
This SSH key authentication thingy is not Hugo related, Hugo just uses it.
Access Github via SSH is in general always better. In my opinion.
PS: Change remote via:
git remote set-url <remote_name> <remote_url>
Where remote_name is most times
origin, if not, you know what it is And remote URL is what you can copy when you check the clone button on your github repo and select the SSH option. Something like
On a vanilla Ubuntu installation, adding
HOME was sufficient:
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|HOME)$']
From the issue comments, Windows users have to add
Depending on how you have configured Git, you may have to add
One user reported the need to add
On Mac OS the following worked:
On CloudCannon the following worked:
Thanks for the suggestion, It’s already connecting via ssh but jmooring’s fix worked
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.