I am trying to use a private Hugo module on my website. I configured git
to use SSH and set the GOPRIVATE
environment variable as well. After this go get
was successfully able to fetch my private module.
However, running hugo mod get
is not able to fetch it.
go mod download: github.com/UtkarshVerma/hugo-yoru@v0.0.0-20220109123722-1082095a19ab: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/subaru/.cache/hugo/modules/filecache/modules/pkg/mod/cache/vcs/3ad850ae5127b0c7fc8bae86a06c9f9b6b8512243fc5c7e8f26205020d5849e7: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
hugo: collected modules in 1877 ms
WARN 2022/01/09 19:36:39 failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go mod download: github.com/UtkarshVerma/hugo-yoru@v0.0.0-20220109123722-1082095a19ab: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/subaru/.cache/hugo/modules/filecache/modules/pkg/mod/cache/vcs/3ad850ae5127b0c7fc8bae86a06c9f9b6b8512243fc5c7e8f26205020d5849e7: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
*errors.errorString
go: github.com/UtkarshVerma/hugo-yoru@v0.0.0-20220109123722-1082095a19ab: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/subaru/.cache/hugo/modules/filecache/modules/pkg/mod/cache/vcs/3ad850ae5127b0c7fc8bae86a06c9f9b6b8512243fc5c7e8f26205020d5849e7: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled