Closed wangxupeng closed 1 year ago
在中国 If you are in China without VPN, Hugo can fail to download modules from GitHub.
To resolve this, you can try adding a proxy to the module section of your config/_defaults/config.yaml:
module: proxy: https://goproxy.cn
Preliminary Checks
Description
$ hugo server hugo: downloading modules … go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20221127215619-58b270a3e103: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset hugo: collected modules in 40847 ms Error: failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal@v1.0.0: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset go: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.7.1-0.20221127215619-58b270a3e103: invalid version: git ls-remote -q origin in C:\Users\AKON_W~1\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\0c88995f39c54fe356dd74460b6359b56b0fb376c52289c9656c86270b2c006d: exit status 128: fatal: unable to access 'https://github.com/wowchemy/wowchemy-hugo-themes/': Recv failure: Connection was reset *errors.errorString
Reproduction Link
https://wowchemy.com/hugo-themes/
Steps to Reproduce
1. 2. 3. ...
Expected Result
use hugo server
Actual Result
cannot use hugo server and hugo
What Hugo Module versions does your site use?
module github.com/wowchemy/starter-hugo-academic
go 1.15
require ( github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20221127215619-58b270a3e103 )
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
Which Wowchemy template are you using?
academic resume
What version of Hugo are you using?
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended windows/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio