-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[snap] hugo server
fails if ~/.gitconfig includes other gitconfig files
#10337
Comments
Is it specific to snap ? Can you reproduce in a docker so we have a easily actionnable reproduction? Can't reproduce on latest so either it is specific to snap or just fixed. |
@Et7f3 Yes, it is specific to Snap. We use the Lines 22 to 31 in 58b8245
@pandruszkow Instead of including an arbitrarily named
Let me know if this works for you or not! Many thanks! |
It affected me as well. I end up remove hugo from snap and installed through apt. |
Having installed hugo through snap (on PopOS! 22.04 LTS) I experienced the same issue. $ hugo
Start building sites …
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371+extended linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=snap:0.109.0
ERROR 2022/12/26 11:59:17 Failed to read Git log: warning: unable to access '/home/[user]/.config/git/config': Permission denied
warning: unable to access '/home/[user]/.config/git/config': Permission denied
fatal: unknown error occurred while reading the configuration files
Error: Error building site: logged 1 error(s)
Total in 343 ms``` |
hugo server
fails if ~/.gitconfig includes other gitconfig fileshugo server
fails if ~/.gitconfig includes other gitconfig files
I replaced the Snap version with a DEB package. It's working flawlessly now. |
Except that
Not that there is anything wrong with that. It is just that Snap's security model seemingly throws us a monkey wrench here.
This I completely agreed. What I meant "arbitrary" above is more in the context of the Snap packaging where snapcraft.yaml currently does not allow us to use a wildcard in the
I'm glad you came to this conclusion, as the .deb package is what I personally use and what I personally maintain for Debian and derivatives. I should have recommended that you switched to the .deb package in the first place. 😅 |
@anthonyfok Due to your extensive efforts to resolve #9078, the Hugo snap package works very well for the vast majority of users. Everything is included; it just works. And the fact that it includes Embedded Dart Sass makes it easy for site authors to transition from LibSass (deprecated) to Dart Sass. I really like the snap package, and wanted to thank you again for your efforts. |
Let's see how to finally close this issue by making the
Here is a quick summary:
So, here's what I'm going to do:
|
in hugo:gitconfig plug (personal-files interface) in case end users need the flexibility of using additional custom git config files. Fixes gohugoio#10337
in hugo:gitconfig plug (personal-files interface) in case end users need the flexibility of using additional custom git config files. Fixes #10337
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes (on snap, Ubuntu 20.04 LTS)
Steps to reproduce
snap install hugo --channel=extended
~/.gitconfig
with:~/.gitconfig.local
:chmod a+r ~/.gitconfig.local ~/.gitconfig
hugo server
Workaround
Follow reproduce steps, but replace
hugo server
withHUGO_ENABLEGITINFO=false hugo server
.Failure does not occur.
The text was updated successfully, but these errors were encountered: