ghpages
ghpages copied to clipboard
Fix for git version >=2.35.2: Add the current dir as a git safe dir
From git 2.35.2, the repository needs to be owned by the current user. See https://github.blog/2022-04-12-git-security-vulnerability-announced/
This occurs because this runs inside Docker with a root user, while the directory is owned by another user (1001 in my case).
Without this, after doing git init, any git command on the repo can either output:
fatal: not in a git directory
or:
fatal: unsafe repository
+1, I am currently affected (failed build), thanks @bryant1410 for the fix.
Dear maintainer, can you please merge this PR, thanks! @maxheld83
@bryant1410 I tried using your branch, but got this error instead:
fatal: could not read Password for 'https://***@github.com': No such device or address
build log: https://github.com/zingzeu/yngping-spec/runs/6813352579?check_suite_focus=true
My workflow config: https://github.com/zingzeu/yngping-spec/blob/edb6eb9ebd6237a9254bd80cf13c69e65bf5a95a/.github/workflows/deploy.yml#L25-L30
Do you have any idea what might have been wrong?
No idea. I'm using my branch in a repo: https://github.com/bryant1410/resume/blob/4b15222/.github/workflows/deploy.yml#L22
I switched to using https://github.com/marketplace/actions/deploy-to-github-pages instead