Hi,
I’m stumped with this one, only 1 project I have is affected. Here are the details.
When using the following commands:
hugo mod get -u
hugo mod get -u ./...
hugo mod vendor
It is failing with the following errors: (truncated)
hugo: downloading modules …
go: errors parsing go.mod:
/path/go.mod:6:2: require github.com/YourOnly-One/hugo-semantic-web: git ls-remote -q origin in /tmp/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/random_numbers_and_letters: exit status 128:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
/path/go.mod:7:2: require github.com/bep/docuapi: git ls-remote -q origin in /tmp/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/random_key: exit status 128:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
WARN 2021/12/23 17:32:25 failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: errors parsing go.mod:
/path/go.mod:6:2: require github.com/YourOnly-One/hugo-semantic-web: git ls-remote -q origin in /tmp/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/some_random_alphanummeric: exit status 128:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
/path/go.mod:7:2: require github.com/bep/docuapi: git ls-remote -q origin in /tmp/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/some_random: exit status 128:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
And so on for every module.
When I tested it with my other projects with hugo modules but it is working fine. But with this project, it is failing in v0.91.1.
Additional information/checks:
- I use GPG as SSH (sample of my setup: How to enable SSH access using a GPG key for authentication)
- I mentioned this because using GPG as SSH doesn’t leave a
~/.ssh/id_
file so if we follow the Troubleshooting from Github,ssh -vT git@github.com
will appear as missing a key even though that same command reportsYou've successfully authenticated
. (Could be related or not.)
- I mentioned this because using GPG as SSH doesn’t leave a
- SSH key is present locally and in Github account. I can SSH pull and push using
git
command - When I downgraded to Hugo v0.91.0 the mentioned hugo commands work smoothly in the affected project.
Anything I missed?
Thank you. Shalom.