2

Using the docsy example site locally with a corporate proxy that uses http:, and attempting to run hugo server returns:

hugo: downloading modules …
go: github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/a81254f0cf90f611158215d1cb50586eccc323b54ab825bb7e9c8b2580ac9fb3: exit status 128:
    fatal: unable to access 'https://github.com/FortAwesome/Font-Awesome/': Failed to connect to github.com port 443: Operation timed out
go: github.com/google/docsy@v0.2.0: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/98f59a39bbbc2d4de9185a32a3d8790111161ae9778e3e5e32a90c95f026ac9b: exit status 128:
    fatal: unable to access 'https://github.com/google/docsy/': Failed to connect to github.com port 443: Operation timed out
go: github.com/twbs/bootstrap@v4.6.1+incompatible: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/452026f8ece4b6e04adce745be52bb14c2f2b65baffde3e5ebfe0112a044536d: exit status 128:
    fatal: unable to access 'https://github.com/twbs/bootstrap/': Failed to connect to github.com port 443: Operation timed out
hugo: collected modules in 106159 ms
Error: failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/a81254f0cf90f611158215d1cb50586eccc323b54ab825bb7e9c8b2580ac9fb3: exit status 128:
    fatal: unable to access 'https://github.com/FortAwesome/Font-Awesome/': Failed to connect to github.com port 443: Operation timed out
go: github.com/google/docsy@v0.2.0: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/98f59a39bbbc2d4de9185a32a3d8790111161ae9778e3e5e32a90c95f026ac9b: exit status 128:
    fatal: unable to access 'https://github.com/google/docsy/': Failed to connect to github.com port 443: Operation timed out
go: github.com/twbs/bootstrap@v4.6.1+incompatible: invalid version: git ls-remote -q origin in /var/folders/56/cm8gd_sj6vx5wwwl3x3wyc_cmskj1x/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/452026f8ece4b6e04adce745be52bb14c2f2b65baffde3e5ebfe0112a044536d: exit status 128:
    fatal: unable to access 'https://github.com/twbs/bootstrap/': Failed to connect to github.com port 443: Operation timed out
 *errors.errorString

Although my .gitconfig contains my proxy settings and works elsewhere.

Attempting to fix, I tried two different methods to setting a proxy for Hugo and Go:

In my Hugo config.toml:

[module]
  proxy = 'http://:@my.proxy.com'
  ...

and separately:

HUGO_MODULE_PROXY="http://:@my.proxy.com"

both of which now return the following error:

$hugo server
go: github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac: refusing to pass credentials to insecure URL: http://:xxxxx@my.proxy.com:8001/github.com/%21fort%21awesome/%21font-%21awesome/@v/v0.0.0-20210804190922-7d3d774145ac.info
...

Any suggestions on getting this to work within the bounds of my proxy?

Jason
  • 7,612
  • 14
  • 77
  • 127

0 Answers0