As per my response to onefetch - can you please instead use the names etc-gitconfig and gitconfig for these interfaces to keep consistency with other snaps?
Also can you please provide some details on why this access is needed for hugo? Thanks.
As per my response to onefetch - can you please instead use the names etc-gitconfig and gitconfig for these interfaces to keep consistency with other snaps?
Yes, for sure! Sorry for the oversight. I have just pushed the fix to gohugoio/hugo master in commit fd3953c:
Also can you please provide some details on why this access is needed for hugo ? Thanks.
Building sites … ERROR 2019/08/15 19:04:04 Failed to read Git log:
fatal: unknown error occured while reading the configuration files
It can be reproduced today with the following commands:
$ git clone https://github.com/gohugoio/hugoDocs.git
Cloning into 'hugoDocs'...
$ cd hugoDocs
$ snap run hugo
Start building sites …
hugo v0.96.0-2fd4a7d3d6845e75f8b8ae3a2a7bd91438967bbb+extended linux/amd64 BuildDate=2022-03-26T09:15:58Z VendorInfo=mage
ERROR 2022/06/24 01:24:45 Failed to read Git log: warning: unable to access '/etc/gitconfig': Permission denied
warning: unable to access '/etc/gitconfig': Permission denied
fatal: unknown error occurred while reading the configuration files
Error: Error building site: logged 1 error(s)
This happens on any Hugo sites where enableGitInfo is set to true because Hugo would then call git (via https://github.com/bep/gitmap) to “get the last Git revision information for every content file”. See Git Info Variables in the Hugo documentation for more information:
And note especially how, on that documentation page, the following Git commit info was included: